J
Joe Bonavita
I need to change images with the click of a button but I don't want the
entire page to refresh so I thought I should just use an embedded page.
I'm trying to use the <object> tag for this but can't figure out how to
change the page in the code behind.
I tried a javascript like this:
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script ");
sb.Append("language='javascript'>");
sb.Append("document.Form1.EmbedPic.data=\"MyPage.aspx?image=Image.jpg\";");
sb.Append("</script>");
RegisterStartupScript("PicPreview", sb.ToString());
but the page never changes. Is there something I'm doing wrong or is there a
better way to do this?
entire page to refresh so I thought I should just use an embedded page.
I'm trying to use the <object> tag for this but can't figure out how to
change the page in the code behind.
I tried a javascript like this:
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script ");
sb.Append("language='javascript'>");
sb.Append("document.Form1.EmbedPic.data=\"MyPage.aspx?image=Image.jpg\";");
sb.Append("</script>");
RegisterStartupScript("PicPreview", sb.ToString());
but the page never changes. Is there something I'm doing wrong or is there a
better way to do this?