.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

CheckBox AutoPostBack

Posted By:santhiyagu       Posted Date: April 28, 2011    Points: 40    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

HTML tag for CheckBox AutoPostBack in asp.net
 



<%@ Page Language="VB" %>

"server">

    Sub chkNewsletter_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
        lblResult.Text = chkNewsletter.Checked.ToString()
    End Sub


<html xmlns="http://www.w3.org/1999/xhtml" >
"Head1" runat="server">
    CheckBox AutoPostBack

<body>
    <form id="form1" runat="server">
    


    
        id="chkNewsletter"
        Text="Receive Newsletter?"
        AutoPostBack="true"
        OnCheckedChanged="chkNewsletter_CheckedChanged" 
        Runat="server" />
    
    
    
        id="lblResult"
        Runat="server" />
    
    

    form>
body>
html>

     

Further Readings:

Responses
Author: RaM         Company URL: http://www.dotnetspark.com
Posted Date: May 02, 2011

We need to Set the Checkbox"chkNewsletter" Autopostback Property to 'True'.This is important...then only the above scenario will work

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend