Csharp
Csharp

Reputation: 2982

Calling a procedure in a different aspx page (within the same project)

In my asp.net project, I have two particular aspx pages (lets say PageA.aspx and PageB.aspx)

In the codebehind PageA.aspx.vb, I want to call "Sub GetDefaultValues()" which happens to be in PageB.aspx

Update:
PageB.aspx has textbox controls that contain default values (which are being read in Sub GetDefaultValues). Those default values get populated into the textboxes of PageA.aspx (based on certain conditions)

Is there a way to do that?

Upvotes: 1

Views: 356

Answers (1)

NoAlias
NoAlias

Reputation: 9193

Create a separate class that holds the method and call it from both pages.

Upvotes: 4

Related Questions