Re: Newbie question
- From: "Lee Alexander" <lee@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Jan 2006 14:30:14 -0000
The collection was empty when i was debugging it (on the submit). The
diagnostics.Writeline was so i could see something in the debugger output
window, equally I could have put it in the response. I don't see the
difference since the collection was empty anyway....
Regards
Lee
"Raymond" <nothere@xxxxxx> wrote in message
news:C27zf.8911$US3.3594@xxxxxxxxxxx
> Use:
> Response.Write( Request.Form["blah"]);
>
> instead of the Debug.WriteLine().
>
> It does come through.
>
> "Lee Alexander" <lee@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:e0pDb1zGGHA.2704@xxxxxxxxxxxxxxxxxxxxxxx
>> I'm trying to get a plain vanilla form post to work separate from the
>> view
>> state stuff. So I started a new Website via Visual Studio 2005 and turned
>> off the ViewState for the default page by using EnableViewState="false",
>> then I added the following HTML to the asp page:
>>
>> <form method="POST" action="Default.aspx" id="formId"
>> enctype="text/plain">
>> <input type="text" name="blah" />
>> <input type="submit" value="Submit" />
>> </form>
>>
>> followed by some code in the pageload method:
>>
>> protected void Page_Load(object sender, EventArgs e)
>> {
>> string s = this.Request.Form.Get( "blah" );
>> System.Diagnostics.Debug.WriteLine( s );
>> }
>>
>> The problem is that I never get 'blah' coming through after submitting
>> the
>> form. I'm sure i'm doing something really stupid here, could anyone put
>> me
>> our of my misery???
>>
>>
>> Regards
>> Lee
>>
>>
>
>
.
- Follow-Ups:
- Re: Newbie question
- From: Raymond
- Re: Newbie question
- References:
- Newbie question
- From: Lee Alexander
- Re: Newbie question
- From: Raymond
- Newbie question
- Prev by Date: Re: virtual PC/Server 2003 hosting glitches...
- Next by Date: Re: StreamWriter problem
- Previous by thread: Re: Newbie question
- Next by thread: Re: Newbie question
- Index(es):
Relevant Pages
|