Click here to Skip to main content
16,022,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wnt to make web have iframe and change iframe src with spasific srce which is given in url for example www.web.com/isrc="/frame2.html" i have done all but did not know how to change src with url parameter
Posted
Comments
Get the iframe element by its id. Then assign whatever you want to its src attribute.

1 solution

make ur iframe runat=server and in code behind add this code

iframeid.Attributes.Add("src", "Webform1.aspx?id=1");
 
Share this answer
 

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