Wednesday, November 28, 2012

Bind asp.net dropdownlist to xml file


Today I was working on binding the dropdown list control from an  XML file. Besides binding the dropdown list from XML file I had to sort the items into ascending order. So I am explaining here what I have done for this.

Let’s define an  XML file first. It consists of Department name of a company.

Tuesday, November 27, 2012

Highlight gridview row on mouse over in asp net web page

In ASP.Net, programmers heavily use the gridview control for data display. Adding some effects in gridview will change the look and feel and make it more interactive for users. One such of effects is highlighting the gridview row on mouse over. With this short background let's go for the design markup of the example gridview.

Monday, November 26, 2012

Creating Captcha Code in ASP.Net

Before entering in to the topic first we must know “What is the Captcha code?” and “Why we used it?” Most of the web sites having the Captcha validation to their sites.

What is the Captcha code?
Captcha code is simply a combination of some characters and numbers like ‘Alk13’ or ‘aTu2eP’ etc.

Why we used it?
We used it for validating this code was really typed by the human.

Wednesday, November 7, 2012

Partial Methods in C#

All of us know that partial type allows us to split definition of type across multiple files but do you know C# also provides supports for partial methods too. Partial methods are used when your code is auto generated by code generation tool. The tool will write only method definition and leave the implementation of for developer if they want to customize.

Thursday, October 25, 2012

OnClientClickevent and AJAX is not working for telerik RadControls

One may need to provide a confirmation dialog or check some validation to the users and initiate an AJAX request if confirmation accepted or validation perform successful. Confirmation using standard post backs often looks like this: 

<asp:Button ID="btnSaveComplaint" runat="server" Text="Save" OnClick="btnSaveComplaint_Click" OnClientClick="return ValidateMacroText();" /> 
 Note: ValidateMacroText() is javascript function which returns true if validation perform successfully.

^ Scroll to Top