Passing values from ASP to ASP.NET
-
I have an application built using classic asp. I built a page using asp .net (C#) and need to retrieve parameter values passed from the asp page. Some of them are working - when I use code like
MyControl = Request.Form["cmbDepartmentID"];
But for unknown reason - the others are not working. So, I tried to create a Session object in the asp page, and retrieve it in the asp.net. In the asp for example -Session("Param") = value
And in the asp.net -MyParam = Session["Param"].ToStrng();
But it doesn't recognize the session object. What is the way to do it? The asp page is a huge mumbo-jumbo of vbscript, javascript, html etc. that I don't follow the flow clearly. But I know querystring is not an option here. Thanks. -
I have an application built using classic asp. I built a page using asp .net (C#) and need to retrieve parameter values passed from the asp page. Some of them are working - when I use code like
MyControl = Request.Form["cmbDepartmentID"];
But for unknown reason - the others are not working. So, I tried to create a Session object in the asp page, and retrieve it in the asp.net. In the asp for example -Session("Param") = value
And in the asp.net -MyParam = Session["Param"].ToStrng();
But it doesn't recognize the session object. What is the way to do it? The asp page is a huge mumbo-jumbo of vbscript, javascript, html etc. that I don't follow the flow clearly. But I know querystring is not an option here. Thanks.ASP and ASP.Net do not share the same session on the same server by default. Microsoft has a way to implement session sharing[^] but I don't think a lot of people have had good experiences with it. Have you done any debugging to output all of the Request.Form items to see if they are being posted? I can't remember if Request.Form in ASP.Net is case sensitive or not.
-
ASP and ASP.Net do not share the same session on the same server by default. Microsoft has a way to implement session sharing[^] but I don't think a lot of people have had good experiences with it. Have you done any debugging to output all of the Request.Form items to see if they are being posted? I can't remember if Request.Form in ASP.Net is case sensitive or not.
Hi Gray, Yes I tried outputting all of them, and some are not being passed to the asp.net. Thats why I can't retrieve them. When I did that - I used the same case wording. I could try the Session sharing technique you pointed to, but it looks like overkill. I'll go back and dig further - and let you know. Thanks.
-
I have an application built using classic asp. I built a page using asp .net (C#) and need to retrieve parameter values passed from the asp page. Some of them are working - when I use code like
MyControl = Request.Form["cmbDepartmentID"];
But for unknown reason - the others are not working. So, I tried to create a Session object in the asp page, and retrieve it in the asp.net. In the asp for example -Session("Param") = value
And in the asp.net -MyParam = Session["Param"].ToStrng();
But it doesn't recognize the session object. What is the way to do it? The asp page is a huge mumbo-jumbo of vbscript, javascript, html etc. that I don't follow the flow clearly. But I know querystring is not an option here. Thanks.http://www.eggheadcafe.com/articles/20021207.asp[^] http://www.devx.com/webdev/Article/30811[^] Try it...
Jinal Desai - LIVE Experience is mother of sage....