Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




ASP.NET interview questions: - How to use a checkbox in a data grid?

Following are the steps to be done:-

  • In ASPX page you have to add Item template tag in data grid.

<ItemTemplate>

<asp:CheckBox id="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="Check_Clicked"></asp:CheckBox>

</ItemTemplate>


If you look at the Item template, we have “OnCheckChanged” event. This “OnCheckChanged” event has “Check Clicked” subroutine is actually in behind code. Note this method, which is in behind code, should either be “protected” or “public”

Following below is the subroutine, which defines the method

Protected Sub Check Clicked (By Val sender As Object, By Val e As EventArgs)

‘Do something

End Sub


Above is the ASP.NET interview questions & also see the following video on Authentication, Authorization, Principal and Identity objects: -

Helpful Website Url
http://www.questpond.com/
Share this article   |    Print    |    Article read by 3861 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles:
Related Interview Questions: