Showing posts with label LinkButton Control. Show all posts
Showing posts with label LinkButton Control. Show all posts

How to Set or Change LinkButton Control Text Programmatically in Asp.Net

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 LinkButton(or drag and drop LinkButton on Design view)->Right click on LinkButton->Select Properties->change LinkButton Text Property to "This LinkButton Text will Change when Button Click"

3.ToolBox->Drag and Drop Two Button on design window->Right click on Button one->select properties->(look for text property) change text property from Button to   LinkButton Text Sign In
->Also change Button two Text property to  LinkButton Text Sign Out
Your Design Window should look like this 
LinkButton Text Changing Programmatically in asp.net










4.Double click on Button1(LinkButton Text Sign In Button) to get the code behind->Write this code
5.Double click on Button2(LinkButton Text Sign Out Button) to get the code behind->Write this code
6.Click F5 to run your project.
LinkButton Text Changing Programmatically in asp.net










LinkButton Text Changing Programmatically in asp.net














LinkButton Text Changing Programmatically in asp.net

How to Enable or Disable LinkButton Control in Asp.Net

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 LinkButton(or drag and drop LinkButton on Design view)->Right click on LinkButton->Select Properties->change LinkButton Text Property to "This LinkButton will Disable when Button Click"


3.ToolBox->Drag and Drop Two Button on design window->Right click on Button one->select properties->(look for text property) change text property from Button to  Enable LinkButton
->Also change Button two Text property to  Disable LinkButton
Your Design Window should look like this 
asp.net LinkButton Enable or Disable Example














4.Double click on Button1(Enable LinkButton Button) to get the code behind->Write this code
5.Double click on Button2(Disable LinkButton Button) to get the code behind->Write this code
6.Click F5 to run your project.
asp.net LinkButton Enable or Disable Example
  










asp.net LinkButton Enable or Disable Example














asp.net LinkButton Enable or Disable Example
 

How to Show or Hide LinkButton Control in Asp.Net

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 LinkButton(or drag and drop LinkButton on Design view)->Right click on LinkButton->Select Properties->change LinkButton Text Property to "This LinkButton will hide when Button Click"


3.ToolBox->Drag and Drop Two Button on design window->Right click on Button one->select properties->(look for text property) change text property from Button to  Hide LinkButton
->Also change Button two Text property to  Show LinkButton
Your Design Window should look like this 
asp.net LinkButton Control Show or Hide Example







4.Double click on Button1(Hide LinkButton Button) to get the code behind->Write this code
5.Double click on Button2(Show LinkButton Button) to get the code behind->Write this code
6.Click F5 to run your project.
asp.net LinkButton Hide or Show Example
    










asp.net LinkButton Hide or Show Example











asp.net LinkButton Hide or Show Example
 

How to use LinkButton Control in asp.net

The LinkButton Control is the same as HyperLink Control But LinkButton has the same functionality as Button control.

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 LinkButton(or drag and drop LinkButton on Design view)->Right click on LinkButton->Select Properties->change LinkButton Text Property to "aspdotnet-park Blog"

 Change the PostBackUrl  properties to your desired url name/link(here i write http://aspdotnet-park.blogspot.com/)
asp.net LinkButton Control


















3.Click F5 to run your project->ok
LinkButton control in asp.net