Can I modify the Request object in ASP.NET?

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
 
K

Kevin Spencer

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.
 
P

Patrice

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
 
B

Bryan Donaldson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top