i need help to call a function in same aspx file to set the imageURL.
so i have:
in the default.aspx
sub fillImage()


end Sub
and on the form load i have:
img1.ImageURl= here i want to call the sub "fillImage" in the same aspx file the default.aspx (of course i don't know how to call a function in another aspx file :( ,i know to use img1.ImageURL="get.aspx" only,and i didn't find anything in the internet)

so i need help .
thank you!

8 Years
Discussion Span
Last Post by cocoll

ok you have a page where you have created a method which does the required job

so i'm thinking if you

create a class in App_Code folder

make a function in which add your method
which might be fetching some parameters and
returning an imageURL

create a class object in any page you want and call the method

hope that helps and makes your code Reusable !


thank you,but the problem is that this sub doesn't return anything it's do this:
retrieve image from database and than i use response.write,so i can create an aspx file and place this method and it's work but in page_load of the second aspx file but i want to call a funtion in the second or current file which do the response.write.
hope that i cleared what i need.
thank you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.