I've got one of the code sections working in .net 2.0
System.Collections.Specialized.NameValueCollection formv = Request.Form;
Label1.Text = "items in form " + formv.Keys.Count.ToString();
Unfortunately it gives a zero value for the count in Label1. I have also simplified the...
Thanks Jason,
That one sentence is incredibly helpful to me. It's tough being a newbie, basically I've got to get a Credit card application converted from tango / pearl to asp.net. I've got most of the code provided by paypal just need to tie the current database driven web forms into the .net...
Should have had a .ToString() on that statement
Label2.Text = Request.Form["Text1"].ToString();
Using that statement I get the following error.
System.NullReferenceException: Object reference not set to an instance of an object.
Do I need to invoke some object prior to the request.form?
Jason,
Thanks for the code but it's a no go, don't even know what var is, maybe it's VB.
Hey all,
Let's distill this to it's simplest form. The following statement is about as basic a test as I can imagine.
Label2.Text = Request.Form["Text1"];
The result gives no error but it gives no value...
I dropped the query string from the post action.
<FORM ACTION="http://backup2//PayPalAspNetNvpSamples/AspNet/testpost.aspx" METHOD="POST">
Still getting nothing showing up in those labels. If I use Label2.Text = "123".ToString(); then 123 does show in label2. Seems it must be something...
filename = testpost.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default...
HTML not asp posting to aspx file
filename=testpost.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
</head>
<body>
<FORM...
I've got an application that submits a form using method=post. Having a tough time accessing these values in asp.net / c#.
Just to clarify a regular html form submits to test.aspx using post method. in the form-load section of the c# I attempt to query the value.
Ex.
Keeping it simple -...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.