473,779 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net dynamic hyperlink

I am old programmer, but this asp.net stuff throws me for a loop.

I have an asp.net page that I need to create a dynamic hyperlink from
based on the user selection from the drop down list and whatever they
enter in the textbox. I have hardcoded ?St=Ok?City=Tyl er but I need
the info to come from the drop down list and textbox.

Here is my code..

<%@Page Explicit="True" Language="VB" Debug="True" %>
<HTML>
<script runat="server">
Sub StartSearch(Sen der As Object, E As EventArgs)

End Sub

</script>
<body>
<h1>Jump Page</h1>
<form runat="server">
<P>
Jump To:<br>
<asp:dropdownli st id="JumpTo" runat="server" autopostback="t rue">
<asp:listitem ></asp:listitem>
<asp:listitem>A L</asp:listitem>
<asp:listitem>A K</asp:listitem>
<asp:listitem>A Z</asp:listitem>
<asp:listitem>A R</asp:listitem>
<asp:listitem>C A</asp:listitem>
<asp:listitem>C O</asp:listitem>
<asp:listitem>O K</asp:listitem>
</asp:dropdownlis t></P>
<P>
<asp:TextBox id="City" runat="server"> </asp:TextBox><br >
<br>
</ASP:IMAGEBUTTON >
<asp:HyperLin k id="HyperLink1 " runat="server" Target="mainFra me"
NavigateUrl="ht tp://www.natltc.com/search.aspx?St= Ok?City=Tyler"> HyperLink</asp:HyperLink></P>
</form>
</body>
</HTML>
*************** *************** *************** ***************

Thanks for any help.
I will even pay someone to tell me how to do this.
I can pay with paypal or credit card, or I'll send a check or money
order.
Jul 21 '05 #1
2 10726
Rob,

Did you know that there is a newsgroup

microsoft.publi c.dotnet.framew ork.aspnet

I am sure that your question is a better place for that than this newsgroup.

Therefore probably you get a quicker answer there,

(And don't offer money, your question is as a see it not a difficult
question in that newsgroup, however I am using the language not in the way
you, as you do is more done in that newsgroup)

Cor

"Rob Rogers"
I am old programmer, but this asp.net stuff throws me for a loop.

I have an asp.net page that I need to create a dynamic hyperlink from
based on the user selection from the drop down list and whatever they
enter in the textbox. I have hardcoded ?St=Ok?City=Tyl er but I need
the info to come from the drop down list and textbox.

Here is my code..

<%@Page Explicit="True" Language="VB" Debug="True" %>
<HTML>
<script runat="server">
Sub StartSearch(Sen der As Object, E As EventArgs)

End Sub

</script>
<body>
<h1>Jump Page</h1>
<form runat="server">
<P>
Jump To:<br>
<asp:dropdownli st id="JumpTo" runat="server" autopostback="t rue">
<asp:listitem ></asp:listitem>
<asp:listitem>A L</asp:listitem>
<asp:listitem>A K</asp:listitem>
<asp:listitem>A Z</asp:listitem>
<asp:listitem>A R</asp:listitem>
<asp:listitem>C A</asp:listitem>
<asp:listitem>C O</asp:listitem>
<asp:listitem>O K</asp:listitem>
</asp:dropdownlis t></P>
<P>
<asp:TextBox id="City" runat="server"> </asp:TextBox><br >
<br>
</ASP:IMAGEBUTTON >
<asp:HyperLin k id="HyperLink1 " runat="server" Target="mainFra me"
NavigateUrl="ht tp://www.natltc.com/search.aspx?St= Ok?City=Tyler"> HyperLink</
asp:HyperLink></P> </form>
</body>
</HTML>
*************** *************** *************** ***************

Thanks for any help.
I will even pay someone to tell me how to do this.
I can pay with paypal or credit card, or I'll send a check or money
order.

Jul 21 '05 #2
For free:-)
<HTML>
<body>
<script>
function geturl()
{
var ddlist=document .getElementById ("JumpTo");
var tb=document.get ElementById("Ci ty");
var index=ddlist.ge tAttribute("Sel ectedIndex");
var hyplink=documen t.getElementByI d("HyperLink1") ;
hyplink.href="W ebForm1.aspx?St ="+ddlist[index].value+"&City=" +tb.value;
}
</script>
<h1>Jump Page</h1>
<form runat="server">
<P>Jump To:<br>
<asp:dropdownli st id="JumpTo" runat="server" autopostback="t rue">
<asp:listitem ></asp:listitem>
<asp:listitem Value=AL>AL</asp:listitem>
<asp:listitem Value=AK>AK</asp:listitem>
<asp:listitem Value=AZ>AZ</asp:listitem>
<asp:listitem Value=AR>AR</asp:listitem>
<asp:listitem Value=CA>CA</asp:listitem>
<asp:listitem Value=CO>CO</asp:listitem>
<asp:listitem Value=OK>OK</asp:listitem>
</asp:dropdownlis t></P>
<P><asp:textb ox id="City" runat="server"> </asp:textbox><br >
<br>
<a id="HyperLink1 " Target="_blank" onclick="geturl ()" href="">HyperLi nk</a>
</P></form></body>
</HTML>

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2560
by: Dave Williamson | last post by:
When a ASPX page is created with dynamic controls based on what the user is doing the programmer must recreate the dynamic controls again on PostBack in the Page_Load so that it's events are wired and are called like a static control. Here is the problem that I need to solve. The processing overhead that occurs to determine what dynamic controls need to be added involves business logic and a query or queries of data in a sql server...
1
2286
by: Gerald Baeck | last post by:
I want to realize a dynamic hyperlink, which changes onclick it's text and it's navigateurl. Unfortunately there is no event for a hyperlink like onclick for buttons. Is there another way to realize this task? thx, Gerald.
2
2259
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the value (link) returned from my class method? I have to send the company ticker to the class in order to get the correct link. I tried embedding the method into the NavigateURL property of the data grid (i.e. NavigateUrl="GetCompanyLink(Ticker)")...
4
4162
by: EvelynAnd Ethan | last post by:
Hi, ItemCommand event not firing from a dynamic user control ,WHERE A DATAGRID HAS BUTTON,when i click on the linkbutton first time the itemcommand event doesnt fire,second time event fires up any answers?? Regards,
2
375
by: Rob Rogers | last post by:
I am old programmer, but this asp.net stuff throws me for a loop. I have an asp.net page that I need to create a dynamic hyperlink from based on the user selection from the drop down list and whatever they enter in the textbox. I have hardcoded ?St=Ok?City=Tyler but I need the info to come from the drop down list and textbox. Here is my code.. <%@Page Explicit="True" Language="VB" Debug="True" %>
3
12364
by: sloesch | last post by:
I am working with VS.net 2003, framework 1.1, developing with VB.net, and ASP.net, and I would like to know how you can create a dynamic hyperlink on the fly to a document stored in a SQL database? I would like to create a VB.net function that would do this, and I found this class *System.Web.UI.WebControls.HyperLink*, but I can not find any examples on generate a dynamic hyperlink. Basically, I want my function to generate an embedded...
1
2627
by: sweetpotatop | last post by:
Hello, I would like to create dynamic hyperlinks in a web page when it is first loaded by using ASP.NET. Basically there will be a list of documents in a folder and I will list them all as a hyperlink for user access. I wonder how I can go through the folder and create the dynamic hyperlink on the fly in ASP.NET.
2
1683
by: Dominique | last post by:
Is it possible to change the size of a Dynamic Panel and fix it? Thanks, -- Dominique
1
2044
by: mitramay | last post by:
I am creating a dynamic datagrid. The controls in some of the template columns will have to be generated based on the data contained in them (i.e. the data for that respective DataField column). For example, if I have a column called Available, the possible values for it are Yes or No. In case it is "Yes" I need a label in that column and in case it is "No" I need a hyperlink. Pls help.
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.