Guest rohan Posted December 25, 2008 Share Posted December 25, 2008 Hi to all,I created a method outside the page_load.Now I want the value of that variable which is defined in the method, in Page_load.thanks..... Link to comment Share on other sites More sharing options...
aspnetguy Posted December 29, 2008 Share Posted December 29, 2008 post your code so we can help you Link to comment Share on other sites More sharing options...
HostingASPNet Posted January 3, 2009 Share Posted January 3, 2009 Hi to all,I created a method outside the page_load.Now I want the value of that variable which is defined in the method, in Page_load.thanks.....Hello,You should give us more info, because it's not very clear what do you want to do.Regards Link to comment Share on other sites More sharing options...
aspnetguy Posted January 4, 2009 Share Posted January 4, 2009 Since you haven't responded I'll take a wild guess as to want you are looking for. You can define a class variable and manipulate it's value in another method. private string myVariable;protected void Page_Load() { myVariable = "page load"; Response.Write(myVariable); //page load someMethod(); Response.Write(myVariable); //some method}private void someMethod() { myVariable = "some method";} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.