HtmlTestwriter

  • Thread starter Thread starter Guest
  • Start date Start date
do you mean this ?

Protected Overrides Sub Render(ByVal writer As
System.Web.UI.HtmlTextWriter)
writer.Write("<script>")
writer.Write("</script>")
End Sub
 
thanks Adrian
but i have a number of buttons
and i want when i click each of them to change the src atributes of an iFrame
thanks
 
Sara,

If you make a usercontrol and place it in the page where you want the code
to appear, you can use the htmltextwriter to output the code you want. as
in the example I gave but instead of outputing script tags, you output
iframe tags. As the render fires after the events for the buttons, you
could set a temporary session variable in the buttons click event to tell
the usercontrol what to do, then clear the session variable.

There might be a better way of doing this but that's all I'd know how to
try.

Regards
Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top