Based on textbox value open web form

Posted by Gow.Net under ASP.NET on 6/19/2012 | Points: 10 | Views : 1253 | Status : [Member] | Replies : 5
i am using auto complete in text-box when i select item in auto complete list ,based on that item open web form
Example::
Text-box i am using auto complete for display Dell,Sony ,hp,tcs items suppose i select Dell means Dell.aspx form display, Sony means Sony.aspx will be display similar to others
how to do that ? any one help me

gowthaman8870226416


Responses

Posted by: Hariinakoti on: 6/20/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Gautham,
can u explain clearly?

Thanks & Regards
Hari

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

Posted by: Johnbhatt on: 6/22/2012 [Member] Starter | Points: 25

Up
0
Down
You can Use JavaScript and OnClientSelected event for firing Javascript Function. Ex.

Create a Switch case Function in JavaScript and pass pages to Windows.Location().
Then When Selected call the function and you will get your solution...

All the best



John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

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

Posted by: Gow.Net on: 6/22/2012 [Member] Starter | Points: 25

Up
0
Down
hi Johnbhatt
i don't know javascript can you please help?
it possible give me code
ok Thanks

gowthaman8870226416

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

Posted by: Ajay.Kalol on: 6/22/2012 [Member] Starter | Points: 25

Up
0
Down

Posted by: Johnbhatt on: 6/22/2012 [Member] Starter | Points: 25

Up
0
Down
Here is JavaScript Code for Recirecting Page and Getting ID

<script language="javascript" type="text/javascript">

function Redirect()
{
var brand= document.getElementById("<%=txtBrandName.ClientID%>").value;
switch (brand) {
case 'hp':
window.location = "http://www.hp.com/";
break;
case 'acer':
window.location = "http://www.acer.com/";
break;
case 2:
}
}
</script>


Now Code for ASPX Page

 <asp:TextBox ID="txtNewDate" runat="server" onblur="Redirect()"></asp:TextBox>

<asp:AutoCompleteExtender ID="txtNewDate_AutoCompleteExtender" runat="server" DelimiterCharacters=""
Enabled="True" ServiceMethod="GetCompletionList"
ServicePath="" TargetControlID="txtNewDate" UseContextKey="True" MinimumPrefixLength="1">
</asp:AutoCompleteExtender>

This is perfectly working in My Machine.

John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

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

Login to post response