Bangalore, , India
jQuery, Ajax, Payment Gateways
0 टिप्पणी करें | 9 लोगो ने देखा है | 14 फरवरी 13  | Ravi Kumar Singh
1. Label Control A. The Label control is used to display the text that the user canrsquot edit. B. The Label control exits with the System.Web.UI.WebControls namespace. C. System.object-gtSysrem.web.UI.Control-gt Sysrem.web.UI.Controls.Contol-gtSystem.web.UI.Controls.Label. ASPX PAGE ltdivgt ltaspLabel IDquotLabel1quot runatquotserverquot TextquotLabelquotgtlt/aspLabelgt ltbr /gt ltaspLabel IDquotLabel2quot runatquotserverquot TextquotLabelquotgtlt/aspLabelgt lt/divgt CODE BEHIND protected void PageLoadobject sender, EventArgs e Label1.Text quotWelcome to the World of ASP.NET 3.5quot Label2.Text quotI have Pink Colorquot Label2.BackColor System.Drawing.Color.Pink 2. Button Control A. Button Control Is used to create a button that sends a request to Web page. B. Button Events Click , Command. C. System.Web.UI.WebControls namespace. ASPX PAGE ltaspButton IDquotButton1quot runatquotserverquot onclickquotButton1Clickquot TextquotClick Me, I will Welcome You quot /gt ltbr /gt ltaspLabel IDquotLabel1quot runatquotserverquotgtlt/aspLabelgt CODE BEHIND protected void Button1Clickobject sender, EventArgs e Label1.Text quot Welcome to the World of ASP.NET 3.5quot Label1.ForeColor System.Drawing.Color.RosyBrown 3. TextBox Control A. The TextBox Control is an input control, which allows you to enter text. B. TextBox Properties-gtTextMode SingleLineBy Default, MultiLine,Password. ASPX PAGE ltdivgt ltaspButton IDquotButton1quot runatquotserverquot TextquotButtonquot onclickquotButton1 Clickquot/gt ltbr /gt ltaspTextBox IDquotTextBox1quot runatquotserverquot Widthquot120quotgtlt/aspTextBoxgtltbr /gt ltaspTextBox IDquotTextBox2quot runatquotserverquot TextModequotMultiLinequot Rowsquot10quotgtlt/aspTextBoxgtltbr /gt ltaspLabel IDquotLabel1quot runatquotserverquot TextquotEnter Password quot Widthquot125quotgt lt/aspLabelgt ltaspTextBox IDquotTextBox3quot runatquotserverquot TextModequotPasswordquotgtlt/aspTextBoxgt ltaspTextBox IDquotTextBox4quot runatquotserverquotgtlt/aspTextBoxgt lt/divgt CODE BEHIND protected void Button1Clickobject sender, EventArgs e TextBox1.Text quotYou have clicked the buttonquot TextBox2.Text quotThis is a multi line textbox. This is a multi line textbox. This is a multi line textbox. This is a multi line textbox. quot TextBox4.Text TextBox3.Text 4. Literal Controls A. Literal control is used for displaying text on the webpage. B. Label has ability to change the style appearing of the displayed text but Literal control does not allow you to apply a style to the displayed text. C. System.object-gtSysrem.web.UI.Control-gt Sysrem.web.UI.Controls.literal ltaspLabel IDquotlblFirstNamequot runatquotserverquot CssClassquotmyCssClassquotTextquotFirst Namequot /gt ltaspLiteral idquotlitFirstNamequot runatquotserverquot TextquotFirst Namequot /gt ASPX PAGE ltaspButton IDquotButton1quot runatquotserverquot Font-BoldquotTruequot OnClickquotButton1Clickquot TextquotClick Mequot /gt ltbr /gt ltaspLiteral IDquotLiteral1quot runatquotserverquotgtlt/aspLiteralgt CODE BEHIND protected void Button1Clickobject sender, EventArgs e Literal1.Text quotlth1gtltmarqueegtWelcome to ASP.NET 3.5lt/marqueegtlt/h1gtquot 5. PlaceHolder Control A. It is used as a container to stored server controls that are added to the web page at runtime. B. System.object-gtSysrem.web.UI.Control-gt Sysrem.web.UI.Controls.Placeholder. C. Properties EnableTheming ASPX PAGE ltaspButton IDquotButton1quot runatquotserverquot TextquotClick Mequot OnClickquotButton1Clickquot /gt ltaspPlaceHolder IDquotPlaceHolder1quot runatquotserverquotgtlt/aspPlaceHoldergt CODE BEHIND public partial class Default System.Web.UI.Page TextBox Textbox1 new TextBox protected void Button1Clickobject sender, EventArgs e Textbox1.Text quotThis is TextBox inside the PlaceHolder controlquot Textbox1.Stylequotwidthquot quot280PXquot PlaceHolder1.Controls.AddTextbox1 Note We can load placeholder control Dynamically. protected void PageLoadobject sender, EventArgs e Button btn1 new Button btn1.Text quotButton 1quot PlaceHolder1.Controls.Addbtn1 Literal lit1 new Literal lit1.Text quotLitral1quot PlaceHolder1.Controls.Addlit1 6. Panel Control a It is used as container for other controls. b The only difference b/w placeholder and panel is that a panel render div tag around all the child control in the panel where as a placeholder will render its child controls. c Panel is useful when you want to use css class to a container ASPX PAGE ltdivgt ltaspPanel IDquotPanel1quot runatquotserverquotgtlt/aspPanelgt lt/divgt CODE BEHIND protected void PageLoadobject sender, EventArgs e Label lbl1 new Label lbl1.Text quotLable Examplequot Panel1.Controls.Addlbl1 d HiddenField control A. The hiddenField control is used to store a value that need to persist across posts to the server. B. Normally view-state, session-state, cookies are used to maintain the state of Web form page. In case, if methods are not available, we can use hiddenField Control. C. System.object-gtSysrem.web.UI.Control-gt Sysrem.web.UI.Controls.HiddenField ASPX PAGE ltaspButton IDquotButton1quot runatquotserverquot TextquotClick Mequot Font-BoldquotTruequot OnClickquotButton1Clickquot /gt ltbr /gt ltbr /gt ltaspLabel IDquotLabel1quot runatquotserverquotgtlt/aspLabelgt ltaspHiddenField IDquotHiddenField1quot runatquotserverquot /gt CODE BEHIND protected void PageLoadobject sender, EventArgs e HiddenField1.Value quotWelcome to the World of ASP.NET 3.5quot protected void Button1Clickobject sender, EventArgs e Label1.Text HiddenField1.Value Label1.ForeColor System.Drawing.Color.RosyBrown

    • इस ब्लॉग के लिए सामाजिक शेयर

पोर्फोलिओ और ब्लॉग
Ravi Kumar Singh विभिन्न कंपनियों का अनुसरण करता है, ये कंपनियां और नियोक्ता Ravi के फिर से शुरू देख सकते हैं
सबसे अच्छा नौकरी के अवसर पाने के लिए अपना फिर से शुरू करें अपलोड करें

मुफ्त रजिस्टर करें!