redirecting to page based on text entered in textbox

Posted by Rrkatariya under VB.NET on 3/13/2013 | Points: 10 | Views : 1736 | Status : [Member] | Replies : 3
Hi,
I am developing a website in that i am providing a search option to user i.e user can enter product name or company name in the textbox and based on that user will redirect to the perticular company page so how would i do that please reply fast its urgent




Responses

Posted by: aswinialuri-19361 on: 3/13/2013 [Member] Starter | Points: 25

Up
0
Down
hi

For that you will use response.redirect("to particular page");in a text changed event then it will be redirected to particular page.

Thanks& Regards

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Rrkatariya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/13/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
HI

PUT cOMPANYLIST folder create your company name aspx file and use this

Client Side
===========
<asp:TextBox ID="txtCmpName" runat ="server" ></asp:TextBox>
<asp:Button ID="Bt_Submit" runat ="server" Text ="Click"
onclick="Bt_Submit_Click" />

Server Side
===============
protected void Bt_Submit_Click(object sender, EventArgs e)
{
if (txtCmpName.Text == "AA") { Response.Redirect("~/CompanyList/ACompany.aspx"); }
if (txtCmpName.Text == "BB") { Response.Redirect("~/CompanyList/BCompany.aspx"); }
if (txtCmpName.Text == "CC") { Response.Redirect("~/CompanyList/CCompany.aspx"); }
}
}

Mark as Answer if its helpful to you

Rrkatariya, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 3/13/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

protected void TextBoxValueChanged(object sender, EventArgs e)
{
Response.Redirect("page u want to go");
}
Specify AutoPostBack property


Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Rrkatariya, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response