.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

Check box selection state

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

Check box selection state in asp.net and C# code sample and example for begineer
 

<%@ Page Language="C#" %>
"server">
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        lblResult.Text = new.Checked.ToString();
    }

<html>

    Show CheckBox

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


    
        id="new"
        Text="Receive new?"
        Runat="server" />
    
    
        id="btnSubmit"
        Text="Submit"
        OnClick="btnSubmit_Click"
        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

The below code is not working.Help me out

lblResult.Text = new.Checked.ToString();

it throwing "type Expected"


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