Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 calling Subroutine from another Page

Author  Topic 

kris55
Starting Member

6 Posts

Posted - 2007-05-09 : 16:54:30
Hi friends,

I am using VB.NET/ASP.NET . I want to call the following subrouting from another page.

public sub refreshgrid()

'' Code goes here

End Sub

Any Idea..?
Thx

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-05-09 : 17:41:11
Don't put that code in a page. put it in a shared function somewhere (i.e., in a module) and then you can call it from any page. You'll need to pass a reference to the DataGrid on your current page that you want to fill up, of course.

If none of that makes any sense, then I strongly recommend reading a good intro book on ASP.NET -- the concept of shared code, classes, objects and references and how asp.net applications and pages and controls work is very, very important to understand fully.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -