HI
I have 3 page index.aspx and store.aspx and Electric.aspx
In index.aspx I have TB and button and this is my user’s table
Id
|
Behcode
|
Name
|
Description
|
T_name
|
1
|
2222
|
Iron
|
Test
|
Store
|
4
|
3333
|
Laundry
|
Test
|
Electric
|
When user type their behcode in TB it go to store.aspx and fill this page with user’s information
This is my code I use query string
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect(store.aspx?behcode=" + Server.UrlEncode(txtNumeric.Text));
}
and store.aspx code
protected void Page_Load(object sender, EventArgs e)
{
string data = Server.UrlDecode(Request.QueryString["behcode"]);
SqlCommand _cmd = new SqlCommand("storeproduct" ,_cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.AddWithValue("@BehCode", data);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
if(_dr.HasRows)
{
DataList1.DataSource = _dr;
DataList1.DataBind();
}
Now I want when user enter their behcode in TB when they click on button it checked T_name column from user’s table if T_name was Store it go to Store.aspx and if T_name was Electric it go to Electric.aspx and fill this page with users information with behcode that they enter in TB thanks alot