How to pass value dynamically in iframe? [Resolved]

Posted by t5j9033387989 under ASP.NET on 12/17/2013 | Points: 10 | Views : 2398 | Status : [Member] | Replies : 5
Here is the code of iframe,



<div id="map_canvas">
<iframe width="100%" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;t=m&amp;ll=37.09024,-95.712891&amp;spn=26.535573,37.353516&amp;z=4&amp;output=embed"></iframe>
</div>



here in this i want pass src's value dynamically
How is it possible?
give me solution for that.?

mark this answer if it will really help you,

Thanks&Regards
ketan



Responses

Posted by: t5j9033387989 on: 12/18/2013 [Member] Starter | Points: 25

Up
0
Down

Resolved
i got solution it is very simple,

string Url = ev.google_map;
iframeid.Attributes["src"] = Server.HtmlDecode(Url);


i simply decode the url,and it works
thanks for give solution.

mark this answer if it will really help you,

Thanks&Regards
ketan

t5j9033387989, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 12/17/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://forums.asp.net/t/1567577.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

t5j9033387989, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 12/17/2013 [Member] [MVP] Platinum | Points: 25
Posted by: vishalneeraj-24503 on: 12/17/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Write below code as:

div_project.InnerHtml = "<iframe src='position.aspx'></iframe>";

t5j9033387989, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: t5j9033387989 on: 12/18/2013 [Member] Starter | Points: 25

Up
0
Down
Hey i use this method for that,

<iframe height="450px" width="450px" scrolling="auto" runat="server" id="iFrame1"></iframe>


  string Url = ev.google_map;
iFrame1.Attributes["src"] = Url;


but the problem is now i face,
i face this problem

i got this source from database,

https://maps.google.nl/maps?q=florijn+34+dronten&amp;ie=UTF8&amp;hq=&amp;hnear=Florijn+34,+8253+DM+Dronten,+Flevoland&amp;ll=52.536417,5.708256&amp;spn=0.008719,0.026157&amp;t=m&amp;z=14&amp;output=embed


which is same as google map link ,but when i assign this value into iframe and run my page in mozila and chrome but map isnot shown i found that source of iframe is changed as runtime of page

https://maps.google.nl/maps?q=florijn+34+dronten&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp;hnear=Florijn+34,+8253+DM+Dronten,+Flevoland&amp;amp;ll=52.536417,5.708256&amp;amp;spn=0.008719,0.026157&amp;amp;t=m&amp;amp;z=14&amp;amp;output=embed


this src is got after run the page,i not found map can anybody give me solution for that.?
in short i found that value of src is change during runtime of my dotnet page.any reason or solution ?


mark this answer if it will really help you,

Thanks&Regards
ketan

t5j9033387989, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response