A Toolbox appear as below figure, you see 9-tabs in toolbox you see button control in standard tab. I will explain all controls in furthur classes.
Add Two textboxes from same tab as shown below
Go to solution explorer right-click on the project click on Add-New Item, Select web-form from the templates window. Name=Inbox click on "ADD" button.
Go to default web page button-click on Button you see a page look as below
In the button Click event you need to add code as below to redirect to our Inbox page
protected void Button1_Click(object sender, EventArgs e)
{if (TextBox1.Text == "abc" && TextBox2.Text == "123")
{
Response.Redirect("inbox.aspx");
}}
Now its ready to run program. Before running as per implementing project the home page is default web page, to set the home page
Go to solution Explorer right click on the default web-page click on set as start page.
To run press F5(to debug)
you see as shown in below picture
So enter abc and 123 to get your Inbox page and click on button and you see our first page redirected to inbox page as shown below

If you want you can add some text on your inbox.aspx page. double click on your inbox.aspx page you see coding part there you see inbox.aspx.cs just add given code below
protected void Page_Load(object sender, EventArgs e)
{Response.Write("Welcome to inbox page");
}
Back to First Page
See you in Next Topic




0 comments:
Post a Comment