?
Solved

very easy

Posted on 2010-03-31
18
Medium Priority
?
269 Views
Last Modified: 2012-05-09
how can I make this work?

<a href= "http://blah.com/sign.aspx?ID=<%=Request.QueryString(id)%>&HH=1" />
0
Comment
Question by:1jaws
  • 9
  • 4
  • 3
  • +2
18 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 400 total points
ID: 29264292
Use javascript: (getQuerystring is shown in the link)
http://www.bloggingdeveloper.com/post/JavaScript-QueryString-ParseGet-QueryString-with-Client-Side-JavaScript.aspx

then your code will look like:
<a href= "http://blah.com/sign.aspx?ID="+getQuerystring('id')+ "&HH=1" />
0
 

Author Comment

by:1jaws
ID: 29266691
this doesnt work..
0
 
LVL 3

Assisted Solution

by:the_bill
the_bill earned 400 total points
ID: 29266858
You can try this
<%
Response.Write("<a href= ""http://blah.com/sign.aspx?ID=" & Request.QueryString(id) & "&HH=1"" />"
%>
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:1jaws
ID: 29267037
no I want this on aspx page.. under hyperlink.. a href
0
 
LVL 3

Expert Comment

by:the_bill
ID: 29267066
NOTE:if id is not a variable you've defined somewhere, when you check Request.QueryString, you need to use

Request.QueryString("id") rather than Request.QueryString(id)
0
 
LVL 5

Assisted Solution

by:aternex
aternex earned 800 total points
ID: 29267090
I think this should work for you.
 <a href='<%=string.format("http://blah.com/sign.aspx?ID={0}&HH=1", Request.QueryString("id"))%>'>
0
 

Author Comment

by:1jaws
ID: 29267359
'string' does not contain a definition for 'format'
0
 
LVL 5

Expert Comment

by:aternex
ID: 29269130
I'm not sure why that would be.  I have used this on occasion to do just this type of thing. I'll see if I can find anything that might cause that, its under the System namespace so it is pretty basic. Sorry for the confusion.
0
 

Author Comment

by:1jaws
ID: 29270028
thank you!
0
 
LVL 3

Expert Comment

by:the_bill
ID: 29274493
<a href= "http://blah.com/sign.aspx?ID=<%=Request.QueryString("id")%>&HH=1" />

whats the error, if any, if that fails?
0
 

Author Comment

by:1jaws
ID: 29277068
'System.Web.HttpRequest.QueryString' is a 'property' but is used like a 'method'
0
 

Author Comment

by:1jaws
ID: 29279042
I cant believe something should be very easy to do.. no solution yet..
0
 
LVL 5

Assisted Solution

by:aternex
aternex earned 800 total points
ID: 29280109
Could I see a little of the code for this page that is giving you the problem, so that I can maybe test it? I havn't been able to replicate the problem you posted for the solution that I offered. I'm not doing anything special, however my web.config has a reference to the system namespace. I just wonder if there is a chance you are missing the declaration for that namespace.
Would you mind trying this  <a href='<%=system.string.format("http://blah.com/sign.aspx?ID={0}&HH=1", Request.QueryString("id"))%>'>link</a>?
0
 

Author Comment

by:1jaws
ID: 29280573
I get this error: Identifier expected, 'string' is a keyword
0
 

Author Comment

by:1jaws
ID: 29280735
What I have is simple asp:HyperLInk and I can either use NavigateUrl or add a href tag to it.. ID = is my parameter that I get that from Request.QueryString("id") .. and some how plug in to NavigateUrl or the a href tag.. Thats about it.. but not working for some reason..
0
 
LVL 12

Assisted Solution

by:rajapandian_81
rajapandian_81 earned 400 total points
ID: 29332968
try below one

<a href= "http://blah.com/sign.aspx?ID=<%Response.Write(Request.QueryString["id"]);%>&HH=1" >aaaaaaaaaaaaa</a>

Open in new window

0
 
LVL 3

Expert Comment

by:the_bill
ID: 29487369
oops! Are you using c#? you need to say

<a href= "http://blah.com/sign.aspx?ID=<%=Request.QueryString["id"]%>&HH=1" />

ie Request.QueryString["id"] NOT Request.QueryString("id")
0
 

Author Closing Comment

by:1jaws
ID: 31709648
Thanks all for the effort.. I have done it different way...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SingleRun is a tool that ensures that only one instance of an application is started, running it again brings the application to focus.
Native ability to set a user account password via AD GPO was removed because the passwords can be easily decrypted by any authenticated user in the domain. Microsoft recommends LAPS as a replacement and I have written an article that does something …
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question