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


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 [...]

No comments: