No, this is not possible the way you are wanting. If you wish to do this, you would have to do a cross-page postback, then redirect back to the current page. So by doing this, you will make these functions somewhat unique to each page. Therefore you might as well make them into a class (a file with common code) and call it from there, or duplicate each function on each page. Repeated code is only hard for the programmer, as the viewer does not download extra code, use extra bandwidth, etc. It's just more difficult to maintain. My recommendations would be just to have the function on each page, unless you will be using it more than 2 or 3 times. If so, put it into a class, and place a reference to the class in your site. Call the class by calling: ClassName obj = new ClassName(); Then call your method within that class: obj.methodCall();
Reputation Points: 43
Solved Threads: 68
Veteran Poster
Offline 1,080 posts
since Sep 2007