About Me

Hi friends. Here i am publish my favourate blogs pictures links post and much more u will definatly like that so go a head enjoy......|

Monday, August 11, 2008

Asp.net ver-1.1 and 2.0

Archive for the ‘asp.net 2’ Category
how to clear controls in asp.net c#
Posted in asp.net 1.1, asp.net 2, c#, tagged , , , on August 9, 2008 No Comments »
Use following code in you page. At Calling Statement send reference of page “this”. It Clears all text boxes and set all checkboxes on page to false
private void ClearControls(Control parent){foreach (Control _ChildControl in parent.Controls){if ((_ChildControl.Controls.Count > 0)){ClearControls(_ChildControl);}else{if (_ChildControl is TextBox){((TextBox)_ChildControl).Text = string.Empty;}elseif (_ChildControl is CheckBox){((CheckBox)_ChildControl).Checked = false;}}}}
Read Full Post »
Registering ASP.NET on IIS after installing the .NET Framework
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on June 6, 2008 No Comments »
Usually this problem occur when we install iIs after installation of Visual studio or .net framework. For this purpose use aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter: aspnet_regiis.exe -i
Read Full Post »
Transparent Cookie Encryption Via HTTP Module
Posted in .net framework 2, asp.net 2 on June 4, 2008 1 Comment »
very nice article about encription of cookies in asp.nethttp://www.codeproject.com/KB/cs/CookieEncryptionModule.aspx
Read Full Post »
parameter passing to crystal report object
Posted in asp.net 2 on May 17, 2008 1 Comment »
When you have to send parameter form asp.net code behind to crystal report then kindly used this syntex or statement to achieve the taskfor example ReportObjectVariable.SetParameterValue(ParmeterName,value)for example if rpt is my report and i send value to customer key and objCustomer is my business object then the sample will be as follow
rpt.SetParameterValue(REPORT_SP_PARAMETER_CUSTOMER_KEY, objCustomer.MasCustKey)
More real word [...]
Read Full Post »
How to remove duplicate from string array in .net
Posted in .net framework 2, asp.net 1.1, asp.net 2, c#, vb.net, tagged , , on April 25, 2008 1 Comment »
In one case i have to right a method to remove duplication from array of strings.i write this code
Public Function RemoveDuplicates(ByVal items As String()) As String()Dim noDupsArrList As New ArrayList()For i As Integer = 0 To items.Length - 1[...]
Read Full Post »
How to filter uploader control using client side script in asp.net
Posted in .net framework 2, Java script, asp.net 1.1, asp.net 2, tagged , , , on April 8, 2008 1 Comment »
For any client side action we have to choose a scripting language to build our logic. Let us go for JavaScript. When use a file control we have to use a button control for doing the uploading action. It is better to refer to Anand’s article CodeSnip: Working with FileUpload Control to get the basic [...]
Read Full Post »
How to add dynamic meta tags in asp.net
Posted in asp.net 1.1, asp.net 2, c#, tagged , , , on February 9, 2008 1 Comment »
Hi all you can add meta tags like that in pageHtmlMeta _MyName = new HtmlMeta();_MyName.Name =” Ali Raza”;_MyName.Content =” just in and test “;Page.Header.Controls.Add(_MyName);
Read Full Post »
How to get uploaded image dimensions in asp.net
Posted in asp.net 1.1, asp.net 2, c#, tagged , , on February 5, 2008 1 Comment »
I used following code to get uploaded image dimensions .Where flLogoUplaoded is name of asp .net file uploaded control at my applicationstring UploadedImageType = flLogoUpload.PostedFile.ContentType.ToString().ToLower();string UploadedImageFileName = flLogoUpload.PostedFile.FileName;//Create an image object from the uploaded fileSystem.Drawing.Image UploadedImage = System.Drawing.Image.FromStream(flLogoUpload.PostedFile.InputStream);//Determine width and height of uploaded imagefloat UploadedImageWidth = UploadedImage.PhysicalDimension.Width;float UploadedImageHeight = UploadedImage.PhysicalDimension.Height;Response.Write( [...]
Read Full Post »
Session vs ViewState
Posted in asp.net 1.1, asp.net 2 on January 15, 2008 No Comments »
Session State is useful for storing values that must be persisted acrossmultiple pages by the same user. ViewState is useful for storingserializable data that must be persisisted across PostBacks by a singlepage. If you use Session State, the value you insert will remain in memoryuntil (1) The Session times out, or (2) Your code removes [...]
Read Full Post »
URL Encoding in asp.net
Posted in asp.net 1.1, asp.net 2, c#, tagged , , on December 27, 2007 No Comments »
One of way while transferring data from one page to other page is Querystring. But one problem is with Querystring is that many characters are not allowed in url. So we must have to send querystings while take limits in mind because alphanumeric and special characters including $-_.+!*’(),) are allowed. Usually browser does not tolerate [...]

Asp.net ver-1.1 and 2.0


Use following code in you page. At Calling Statement send reference of page “this”. It Clears all text boxes and set all checkboxes on page to false
private void ClearControls(Control parent){foreach (Control _ChildControl in parent.Controls){if ((_ChildControl.Controls.Count > 0)){ClearControls(_ChildControl);}else{if (_ChildControl is TextBox){((TextBox)_ChildControl).Text = string.Empty;}elseif (_ChildControl is CheckBox){((CheckBox)_ChildControl).Checked = false;}}}}


Usually this problem occur when we install iIs after installation of Visual studio or .net framework. For this purpose use aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter: aspnet_regiis.exe -i

When you have to send parameter form asp.net code behind to crystal report then kindly used this syntex or statement to achieve the taskfor example ReportObjectVariable.SetParameterValue(ParmeterName,value)for example if rpt is my report and i send value to customer key and objCustomer is my business object then the sample will be as follow
rpt.SetParameterValue(REPORT_SP_PARAMETER_CUSTOMER_KEY, objCustomer.MasCustKey)
More real word [...]

In one case i have to right a method to remove duplication from array of strings.i write this code
Public Function RemoveDuplicates(ByVal items As String()) As String()Dim noDupsArrList As New ArrayList()For i As Integer = 0 To items.Length - 1[...]

For any client side action we have to choose a scripting language to build our logic. Let us go for JavaScript. When use a file control we have to use a button control for doing the uploading action. It is better to refer to Anand’s article CodeSnip: Working with FileUpload Control to get the basic [...]

How to add dynamic meta tags in asp.net


Hi all you can add meta tags like that in pageHtmlMeta _MyName = new HtmlMeta();_MyName.Name =” Ali Raza”;_MyName.Content =” just in and test “;Page.Header.Controls.Add(_MyName);
I used following code to get uploaded image dimensions .Where flLogoUplaoded is name of asp .net file uploaded control at my applicationstring UploadedImageType = flLogoUpload.PostedFile.ContentType.ToString().ToLower();string UploadedImageFileName = flLogoUpload.PostedFile.FileName;//Create an image object from the uploaded fileSystem.Drawing.Image UploadedImage = System.Drawing.Image.FromStream(flLogoUpload.PostedFile.InputStream);//Determine width and height of uploaded imagefloat UploadedImageWidth = UploadedImage.PhysicalDimension.Width;float UploadedImageHeight = UploadedImage.PhysicalDimension.Height;Response.Write( [...]

Session vs ViewState

Session State is useful for storing values that must be persisted acrossmultiple pages by the same user. ViewState is useful for storingserializable data that must be persisisted across PostBacks by a singlepage. If you use Session State, the value you insert will remain in memoryuntil (1) The Session times out, or (2) Your code removes [...]

URL Encoding in asp.net

One of way while transferring data from one page to other page is Querystring. But one problem is with Querystring is that many characters are not allowed in url. So we must have to send querystings while take limits in mind because alphanumeric and special characters including $-_.+!*’(),) are allowed. Usually browser does not tolerate [...]