Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Another problem with passing variables from form to form

okay well if you guys read my previous post about this topic , I was trying to get a variable be passed from pageA to pageB to pageC. I'm able to all that, the problem is that I have a datagrid that gets filled up based on what the passed variable is lets call the variable "V" .

anyways , the datagrid gets filled when the pageC loads up . the problem is that when a user clicks on a button to perform an action that requires the information from the datagrid , what happens is that the button causes a postback which causes the pageLoad sub to perform and when it gets to the line that says :" sendingpage = CType(context.Handler, JobDetails) " it will throw an error saying that it cannot convert . So I added the "if not Ispostback " IF statement around that part of the line but then what happens is that my other functions cant get the values needed from the information that is retrieved by that line "sendingpage = Ctype(Context.handler, jobdetails) "

I basically need a way to keep the information that I get from one of the properties of sendingPage once it is converted the very first time. That way I can keep the if not ispostback around that line : "sendingpage = Ctype(Context.handler, jobdetails) " and avoid the "cant convert" problem.
[1282 byte] By [Matrix.net] at [2007-11-11 10:19:01]
# 1 Re: Another problem with passing variables from form to form
hello and yep , I found the solution to my problem so thanks anyways . Just if people were wondering what I did was I kept the if not ispostback if statment around the part of code I mentioned uptop that would cause the "cant convert" problem . Then once I got the variable from the previous form , I took it and made it the text property of a non visible label on the form since non of that is deleted from the browser's memory after the postback caused by the button. Then I just refered to that text property instead as the parameter for my other functions . :cool:
Matrix.net at 2007-11-11 23:11:59 >