| | |
Request and Respond doesn't exist in new .NET framework..
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2007
Posts: 28
Reputation:
Solved Threads: 0
Hi,
I have an old web-application in production which works fine. Now I want to make some changes and loads it into MS web developer express with the newest .NET framework installed. The problem occours when loading the website into the program. It seems that the "My" doesn't support request and response on cookies anymore.
ex. My.Request.Cookies("TestEmail")
I have succeeded finding the alternative to respond: System.Web.HttpContext.Current.Response.Cookies.Add
But have not been able to find the new way for Request. Can somebody help me doing this?
I have an old web-application in production which works fine. Now I want to make some changes and loads it into MS web developer express with the newest .NET framework installed. The problem occours when loading the website into the program. It seems that the "My" doesn't support request and response on cookies anymore.
ex. My.Request.Cookies("TestEmail")
I have succeeded finding the alternative to respond: System.Web.HttpContext.Current.Response.Cookies.Add
But have not been able to find the new way for Request. Can somebody help me doing this?
You'll get it with:
Take a look at
VB.NET Syntax (Toggle Plain Text)
Dim Resp As System.Net.HttpWebResponse ' Make WebRequest ' Resp.Cookies has the cookies
System.Net.WebResponse and System.Net.HttpWebResponse namespaces. You should find everything you need in them (and in Request namespaces of cource). Teme64 @ Windows Developer Blog
•
•
Join Date: Nov 2007
Posts: 28
Reputation:
Solved Threads: 0
•
•
•
•
You'll get it with:
Take a look atVB.NET Syntax (Toggle Plain Text)
Dim Resp As System.Net.HttpWebResponse ' Make WebRequest ' Resp.Cookies has the cookiesSystem.Net.WebResponseandSystem.Net.HttpWebResponsenamespaces. You should find everything you need in them (and in Request namespaces of cource).
System.Web.HttpContext.Current.Request.Cookies.Item("Role").Value()
instead of
My.Request.Cookies("Role").Value()
I just don't hope that the change will change behaviour elsewhere in the program. It hasn't until now, so maybe this is the way.
I think it is weird that the framework has changed these things. A lot of older websites must be edited quite a bit.
IMHO the difference between classic ASP and ASP.NET is so huge that in most cases it's a lot more easier to take only the "application logic" and rewrite from the scratch with ASP.NET
Teme64 @ Windows Developer Blog
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: SQL In VB.NET
- Next Thread: need help with for/next loops
Views: 686 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 2008 access add application array assignment basic box button buttons center class click code combo convert cpu data database datagrid datagridview design designer dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees error excel exists firewall function image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net opacity page pan picturebox port print printing printpreview problem record refresh regex reports" reuse right-to-left save savedialog search serial socket sorting sql sqldatbase storedprocedure string structures studio temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet vista visual visualbasic visualbasic.net visualstudio2008 web wpf xml





