473,778 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form database contents hyperlink

I'm using ASP.Net and SQL Server. I have a table called states. I have 2
forms.
On form 1 is the 50 states in textboxes created with a loop.
I want to have those 50 or 45 or whatever amount of states have a hyperlink.
Once you click the hyperlink it will take the stateId from the click event
and use the Get method to send it to the next page.
Page 2 will simply use the browswer get method to show information based on
that stateid.
So my question is how to create a text hyperlink using a loop that onclick
of hyperlink it opens up the next page like: http://www.etc.com?stateid.
How do I create that hyperlink?

Thanks.
Nov 18 '05 #1
2 1783
First of all, if you have a table called states, you probably have there a
record for every state. Then why do you need a loop to create textboxes? You
can use a datagrid or datalist or repeater and databind it to the table.
Even if you for whatever reason want textboxes, you can make a templated
column.

Now, there is a server control called HyperLink You can either use it
instead of the textbox or next to the textbox. You will have to setup in
runtime its property NavigateUrl. If you are using a loop, do it in the
loop. If you switch to a datagrid/datalist/repeater, use either databinding
expression or ItemDataBound event. That is the direction. The details you
can work out yourself.

Eliyahu

"Big E" <no****@nospam. com> wrote in message
news:Ov******** *****@tk2msftng p13.phx.gbl...
I'm using ASP.Net and SQL Server. I have a table called states. I have 2
forms.
On form 1 is the 50 states in textboxes created with a loop.
I want to have those 50 or 45 or whatever amount of states have a hyperlink. Once you click the hyperlink it will take the stateId from the click event
and use the Get method to send it to the next page.
Page 2 will simply use the browswer get method to show information based on that stateid.
So my question is how to create a text hyperlink using a loop that onclick
of hyperlink it opens up the next page like: http://www.etc.com?stateid.
How do I create that hyperlink?

Thanks.

Nov 18 '05 #2
Another way would be to use Literal control and add the content between an
<a> tag.

"Eliyahu Goldin" <re************ *@monarchmed.co m> ¦b¶l¥ó
news:uC******** ******@tk2msftn gp13.phx.gbl ¤¤¼¶¼g...
First of all, if you have a table called states, you probably have there a
record for every state. Then why do you need a loop to create textboxes? You can use a datagrid or datalist or repeater and databind it to the table.
Even if you for whatever reason want textboxes, you can make a templated
column.

Now, there is a server control called HyperLink You can either use it
instead of the textbox or next to the textbox. You will have to setup in
runtime its property NavigateUrl. If you are using a loop, do it in the
loop. If you switch to a datagrid/datalist/repeater, use either databinding expression or ItemDataBound event. That is the direction. The details you
can work out yourself.

Eliyahu

"Big E" <no****@nospam. com> wrote in message
news:Ov******** *****@tk2msftng p13.phx.gbl...
I'm using ASP.Net and SQL Server. I have a table called states. I have 2
forms.
On form 1 is the 50 states in textboxes created with a loop.
I want to have those 50 or 45 or whatever amount of states have a

hyperlink.
Once you click the hyperlink it will take the stateId from the click event and use the Get method to send it to the next page.
Page 2 will simply use the browswer get method to show information based

on
that stateid.
So my question is how to create a text hyperlink using a loop that onclick of hyperlink it opens up the next page like: http://www.etc.com?stateid.
How do I create that hyperlink?

Thanks.


Nov 18 '05 #3

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

Similar topics

3
2231
by: B Love | last post by:
I am trying to insert a hyperlink field which will link to a JPEG file in a folder on a server but for some reason, I am unable to do so. I can enter the same information in a browser, and it pulls up the image that I want. Doesn't Access like JPGs? Thanks, Bruce
13
2201
by: MLH | last post by:
I have a RDBMS app consisting of 3 primary mdb's... 1) a front-end with a few STATIC tables and the other menagerie of objects 2) a back-end with most of my DYNAMIC tables. I'll call it my main backend. 3) another back-end = zip.mdb with about 43000 zips/cities/states The app has been operating stably (is that a word?) for some years. No probs. The main backend is 63.3 megs now and contains tens of thousands of letters - legal...
1
1390
by: jm | last post by:
<td> <asp:HyperLink id="ORDER_ID" NavigateUrl= '<%# DataBinder.EvalContainer.DataItem, "ORDER_ID")%>' runat="server"> <%# DataBinder.Eval(Container.DataItem, "ORDER_ID") %> </asp:HyperLink> </td>
2
2513
by: c676228 | last post by:
Hi, This is my first time to post asp.net question on this forum. I have a question for "How to pass the first form value to the next form" I have enrollinfo.aspx form which look like as follow: <form id="Form1" method="post" runat="server"> <Subway:Address id="address" runat="server" Caption="Home Address"></Subway:Address> <p></p> <SUBWAY:PEOPLEINFO id="Peopleinfo" runat="server" Caption="Employee Information"></SUBWAY:PEOPLEINFO>
5
1785
by: kbrad | last post by:
I have an Access database set up with a number of text fields and a hyperlink field which references a different image per record. I am trying write ASP code to retrieve allt his data and images onto a web page. I have the data but the images are causing a problem. The code I am using is as follows: For the data: <TD><P><FONT COLOR="#000000"><% Response.Write rsRecordset("Fieldname") %></FONT></TD> This is fine. For the images:
1
2816
by: steventhomas42 | last post by:
Greetings, I am creating a website for a volunteer-based organization that would like to accept volunteer registrations online. They want the visitors to fill out a simple form to submit and have the data stored on the server. The staff then needs to be able to pull up a password-protected listing of all volunteers. I am not opposed to using MySQL, but I'm not a SQL programmer. I think
6
7625
by: Michael Kintner | last post by:
I am looking for add-on tools or code to allow me to attach scanned PDF documents to a database record. I would like to know if there are developer tools out there that can do the following: - Appending muliple as in many PDF docs to a specific record. - Or maybe I create a folder and the AccessDB reads the contents of the folder showing the files related to the specific record. Kinda like a achive file manger of related files to a...
13
42988
ADezii
by: ADezii | last post by:
Recently, there have been several questions and much confusion concerning the Topic of Hyperlinks. Specifically, Users wanted to know how to retrieve a File Name from a FileDialog Box, copy the Name to a Bound Text Box on a Form, and save the Hyperlink to the underlying Table. The code demos below will do just that: retrieve the Absolute Path of of File from a FileDialog Box, use the Base Name (no extension) as the Display Text for the...
5
8809
LAD
by: LAD | last post by:
Using Access 2003 on Windows 2000. My Skill Level: Med Low (Some VBA, okay with Access) Form: Single View - based on Query of single Table to sort by field. Application: Dealers email 'contract packages' that include as attachments: a contract (PDF or TIF), a pricing tool (Excel), a companion document (Word). Clerks detach these files into a shared drive file on our intranet. I'm building an 'contract package management' application...
0
9629
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
10298
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...
0
10127
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
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
8957
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
7475
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
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2865
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.