Hi
I have 2 page index.aspx and store .aspx
In index.aspx I have 1TextBox and 1Button when user enter their behcode in TB and click on Button it go to store.aspx page and fill this page with that user information
1-index.aspx
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Store.aspx?behcode=" + Server.UrlEncode(txtNumeric.Text));
}
2-store.aspx
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();
}
_cn.Close();
}
3-users table
Id
|
Behcode
|
name
|
description
|
Image
|
1
|
1111
|
Jack
|
Test
|
1.jpg
|
2
|
2222
|
Sara
|
test
|
2.jpg
|
In store.aspx I have 2 button when user click on each of them it go to especial page
Button1=aboutus.aspx button2=article.aspx
Now I want when user enter their behcode in index.aspx and according to that behcode go to store.aspx and see their page when they click one of 2 button in store.aspx they go to article or about us page and in that page again fill with them information from user’s table according to behcode that they entered in index.aspx page.
how i can do it?
thanks alot