hi
I have 1 textbox and 1 button in my page
when users type their user name in text box they go to their page
these are my code
<div id="behcode">
<div id="divbehcodebtn">
<asp:ImageButton ID="ImageButton3" runat="server" CssClass="imgbtnbehcode"
onclick="ImageButton3_Click" OnClientClick = "return ValidateRange()" ForeColor="Transparent" AlternateText="" />
</div>
<div id="TBright">
<asp:TextBox ID="txtNumeric" runat="server" onkeydown = "return isNumeric(event.keyCode);" onpaste = "return false;" CssClass="txtbehcode"></asp:TextBox>
</div>
</div>
Behind code
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
string data = Server.UrlEncode(txtNumeric.Text);
SqlCommand _cmd = new SqlCommand("traidname", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cmd.Parameters.Add("@BehCode", data);
_cn.Open();
string tName = _cmd.ExecuteScalar().ToString();
_cn.Close();
Response.Redirect(tName + "?BehCode=" + Server.UrlEncode(txtNumeric.Text));
}
how i can do it?
Thanks