Suppose that i have two text boxes and a button which are created using html tags.
when i press the button i want to show the things available in the txt boxes in 2 labels.
i know we can use c# coding inside using <% %> tags..
But where should i pud those coding..What are the other requirements to do so..
If anyone can help me from the begining in a simple way it ll be a great help for me..
Thank you...
Ish BandhuPosted Feb 18, 2013, 3:48 AM
public partial class _Default : System.Web.UI.Page
{
//Create public variable inside the class
public string value = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn1_Click(object sender, EventArgs e)
{
//set the variable value on button click
value="test";
}
}
In aspx page
//Create a label and get the variable value
//Button on which click set the value
Same thing u can do for complete ur requirement
Tharake GunatilakePosted Feb 18, 2013, 10:21 PM
Ish BandhuPosted Feb 18, 2013, 6:05 AM
Tharake GunatilakePosted Feb 18, 2013, 5:26 AM