I am a novice programmer.
I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132.
On click I want to extract the query string and use it to query a table
within a DB (SQL Server). The stored procedure takes the query string as a
parameter and returns the actual URL the page is going to be redirectted. I
can do this using a button, but I have done little work with ASP.NET
hyperlinks. I've never used a link to query a DB using a parameter from the
link itself. I am using C#.
Can anyone please help me with some code? Don't worry about the DB stuff. I
can handle that. I only need help with the code associated with the hyperlink
(extracting the query string and using a value returned from a SP as a link
for the page to be redirected to).
Thanks,
Hector 10 1808
string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message
news:4D******** *************** ***********@mic rosoft.com... I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message
news:4D******** *************** ***********@mic rosoft.com... I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I don't think you understood my problem. The code you sent me and pointed me
to deals with requesting querystrings. This is the scenario:
In my site I have a dynamic hyperlink. The hyperlink is populated from a
database based on some ID field. One of the fields of the DB is the actual
link the hyperlink points to. So when I click my own hyperlink, the link goes
to the DB using the value in its query string, retrieves the value of the URL
field for that row and redirects the user to that URL.
Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote: string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com...I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB using a parameter from the link itself. I am using C#. Can anyone please help me with some code? Don't worry about the DB stuff. I can handle that. I only need help with the code associated with the hyperlink (extracting the query string and using a value returned from a SP as a link for the page to be redirected to).
Thanks, Hector
I did understand your problem and I thought you'd be grateful that I solved
half your problem.
I thought you could figure out the other part, which is simple string
concatenation.
In case I overestimated your skills, here's some code for you to explore
that can solve the other half of your problem.
MyHyperLink.Nav igateUrl="Whate ver.aspx?MyPara meter="+
Server.UrlEncod e(SomeString);
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message
news:77******** *************** ***********@mic rosoft.com... I don't think you understood my problem. The code you sent me and pointed me to deals with requesting querystrings. This is the scenario: In my site I have a dynamic hyperlink. The hyperlink is populated from a database based on some ID field. One of the fields of the DB is the actual link the hyperlink points to. So when I click my own hyperlink, the link goes to the DB using the value in its query string, retrieves the value of the URL field for that row and redirects the user to that URL. Thank you for your help, but it covers only half of what I want to do.
Hector
"Steve C. Orr [MVP, MCSD]" wrote:
string s = Request.Queryst ring("a");
Here's more info: http://www.dotnetbips.com/displayarticle.aspx?id=79
-- I hope this helps, Steve C. Orr, MCSD, MVP http://SteveOrr.net
"hecsan07" <he******@hotma il.com> wrote in message news:4D******** *************** ***********@mic rosoft.com... >I am a novice programmer. > I want to have a hyperlink that looks like so: > www.mycoolsite.com?a=21132. > On click I want to extract the query string and use it to query a table > within a DB (SQL Server). The stored procedure takes the query string > as a > parameter and returns the actual URL the page is going to be > redirectted. > I > can do this using a button, but I have done little work with ASP.NET > hyperlinks. I've never used a link to query a DB using a parameter from > the > link itself. I am using C#. > Can anyone please help me with some code? Don't worry about the DB > stuff. > I > can handle that. I only need help with the code associated with the > hyperlink > (extracting the query string and using a value returned from a SP as a > link > for the page to be redirected to). > > Thanks, > Hector This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Marco Krechting |
last post by:
Hi All,
Sorry but I have to create new message since it cannot find the old
message to send a reply. Coming back to this hyperlink thing I will
try to explain the real problem cause I think we are going in circles.
I have a continous form with a hyperlink field on it. Normally when
you click on a hyperlink field Access will follow the Hyperlinkbase
set in the database.
This is for example in my case "I:\". However I have two different
|
by: Kumar |
last post by:
Hi Folks,
I have a question regarding conditional hyperlink in datagrid.
I want to display Hyperlink if my QID values in (1,4,5,6) other wise i
want to display just Qdescription with out hyperlink.
<asp:hyperlinkcolumn headertext="Question" SortExpression="QDescription"
datatextfield="QDescription"
|
by: Martin Dew |
last post by:
Having some problems getting a hyperlink object to work in my repeater
control, It displays the text I have asked it to for the hyperlink, but it
does not act as a link. My repeater code is below but here is the snippet of
my asp:hyperlink object;
<asp:HyperLink
NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta
iner.DataItem,"CLIENTREF")%>
ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
|
by: Robson Carvalho Machado |
last post by:
Dear friends,
I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an
1px transparent image only to determine link position, but as I create this
link dynamically I could not set image width. This problem makes my link
clickable only on its borders.
When viewing HTML source I could see that spacer.gif has no width and
height, so HTML shows only 1px x 1 px image.
|
by: D. Shane Fowlkes |
last post by:
Hello All.
I keep asking for help with this on the www.asp.net forums and nobody seems
to be able to help. What I'm trying to accomplish is very simple. I simply
want to create a Hyperlink Column in a Datagrid and reformat the text output
of the column. The helper function seems to be working but the hyperlink
column isn't properly being render into html. The actual hyperlink web
control is showing up in the html when tested on two...
| |
by: david |
last post by:
Hi, all:
I need a help from you about DataGrid control.
I created a DataGrid, dg, in design view of .NET visual Stadio and use the
builder to add a Hyperlink column to dg.
I want to try to assign a column of URLs to this hyperlink column in
programming way (ie., dynamically assignment). However, I can not find a way
to continue doing it.
Do you have ideas about it? Thanks.
|
by: Joe |
last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first
column contains hyperlinks. When a user clicks one of these hyperlinks, he
will navigate to another aspx page (referred to here as page_2). I need to
cache the value of the link's text (hyperlink.text property) so that I can
use it in the page_load event of page_2.
I've thought of using a hidden field and then calling
Request.Form("hdnClickedLinkText") in the...
|
by: David Thielen |
last post by:
Hi;
I have help html pages for each page of my ASP.NET webapp. So for the page
datasource.aspx, I have help\datasource.htm.
Bu what I want when the hyperlink is clicked, for it to look for the
following files in order (assuming I am running from the us):
help\datasource_en_US.htm
help\datasource_en.htm
help\datasource.htm
|
by: vspsdca |
last post by:
Hi,
I'm a newbie here and does not really have any formal training on VBA. I just need help to get my hyperlink to work. I have a form in MS Access with a browse button where a user can select a folder from a specified directory from our network. I was able to get the browse button working where it saves a path that is selected onto the textbox that is set as hyperlink. The problem appears when you click on the hyperlink... it will work a few...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |