Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I want to insert in <%#=address%>. How do you do this in ASP.net I know how to do it in php:

HTML
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<%#=address%>&zoom=13&size=600x600&maptype=roadmap&sensor=true" alt="Home" />
Posted
Updated 17-Jun-14 22:24pm
v4

1 solution

You may try as shown below.

Note: This is just a sample.Please Adjust it according to your app.

1. Redirect to a location with a query string :

Response.Redirect("YourPage.aspx?id=" + yourId.toString(), true);


2. Render the button as a LinkButton and set the URL :

LinkButton myLinkButton = new LinkButton("YourPage.aspx?id=" + yourId.toString(), true);


3. Render the button as a client side link (with Repeater control)
<a href='YourPage.aspx?id=<%# Eval("yourID") %>'>Link</a>
 
Share this answer
 
v2
Comments
Teledextri 18-Jun-14 4:56am    
How do you define <%# Eval("yourID") %> How do you assign a value?
Sampath Lokuge 18-Jun-14 5:14am    
Actuality it's a Repeater Control.Please check this link for more info.http://msdn.microsoft.com/en-us/library/zzx23804(v=vs.85).aspx
Teledextri 18-Jun-14 6:25am    
How do you define "yourID" in ASP.net vb without a gridview or Repeater?
Sampath Lokuge 18-Jun-14 6:47am    
Why can't you use 1st or 2nd method if you don't have any repeater thing in your app ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900