Can I modify the Request object in ASP.NET?

  • Thread starter Thread starter Marc Gingras
  • Start date Start date
M

Marc Gingras

Hi,

I tried to modify the request object when my aspx page is loaded(or
before). When I try to do it a received a "Read only" error message.
Is it possible to modify a Request when the server received it? What
I want to do is something like that:

Me.Request.form.Item("Name")="NewName"

If I can do it this way, How can I do it otherwise?

Thanks

Marc Gingras
 
If you got a phone call from a friend, could you modify what they say to
you? It's the same thing with the Request object. It is created by parsing
the Request sent from the browser. You can't change what the browser
Requests. You can only change your Response to it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Not possible.

If somewhere in your code you use Request.form("Name"), instead of trying to
change this value you could change your code to use directly "NewName"
instead...

Patrice
 
Request is Read Only (as the error message indicates).

If you need to do this - store the Request value in a variable and use that
variable where you'd use the Request call. Update the variable when / where
needed.
 
Back
Top