image on button in windows form from url on the fly

  • Thread starter Thread starter sunnyz
  • Start date Start date
S

sunnyz

hi all
plz help me in displaying image on button in windows form from a url
or website.
I am using C#.The image should not be stored on local computer...the
function shud get the image directly from the website and display it
on the button
 
Sunnyz,

Do us a favor and do not multipost to dotnet newsgroups, I see no reason why
you send this message to the newsgroup VB.Net. I have answered you in the
newsgroup CSharp as well with the same message. Beneath is a sample I made
for you.


\\\
private void Page_Load(object sender, System.EventArgs e)
{
this.ImageButton1.ImageUrl =
"http://msdn.microsoft.com/vbasic/art/vbasic03/hls_VB_overview.gif";
}
private void ImageButton1_Click(object sender,
System.Web.UI.ImageClickEventArgs e)
{
String str;
str = "<script language=javascript>
{window.open('http://msdn.microsoft.com/vbasic/productinfo/overview/default.
aspx');} </script>";
RegisterStartupScript("Startup", str);
}
///
I hope this helps,

Cor
 

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