Literal and Label control are same except that Literal Control does not allow you to apply a style to the displayed Text.
1.File-> New-> Website-> ASP.NET Web Site(Visual C#) -> Ok
(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)
2.Click ToolBox-> Double Click on Literal(or drag and drop Literal on Design view)->change Literal Text Property to "Literal Test"
3.Click ToolBox-> Double Click on Button->change Button Text Property to "Click to change text"
4.Double Click on the Button to get the code behind and write this code
5.Click F5->ok
1.File-> New-> Website-> ASP.NET Web Site(Visual C#) -> Ok
(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)
2.Click ToolBox-> Double Click on Literal(or drag and drop Literal on Design view)->change Literal Text Property to "Literal Test"
3.Click ToolBox-> Double Click on Button->change Button Text Property to "Click to change text"
Your design Window should look like this |
5.Click F5->ok
After Running the project |
After Clicking the Button (Literal text is changed) |
No comments:
Post a Comment