1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Form does not seem to be submitting properly

Discussion in 'C#' started by Sleeping Troll, Jul 7, 2008.

  1. #1
    This is the asp that generates the form:

    Response.Write("			<form name='Item"&x&"' action='EditItem.asp' method='Post'>"&vbcrlf)
    Response.Write("			<tr>"&vbcrlf)
    Response.Write("				<td   bgcolor='#FFFFFF'>"&vbcrlf)
    Response.Write("				<a>"&vbcrlf)
    Response.Write("					<input type='text' id='Qty"&x&"' value='"&Qty&"' size='3' maxlength='3'>"&vbcrlf)
    Response.Write("				</a>"&vbcrlf)
    Response.Write("				</td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Dsc"&x&"'>"&Dsc&"</a></td>"&vbcrlf)
    Response.Write("					<td width='1'><img id='Pic"&x&"' border=0 src='Images/Products/"&ProdID&".png' onload='this.style.height=20' onmouseover='this.style.height=150' onmouseout='this.style.height=20'></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ech"&x&"'>"&Ech&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ext"&x&"'>"&Ext&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Shp"&x&"'>"&Shp&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ttl"&x&"'>"&Ttl&"</a></td>"&vbcrlf)
    Response.Write("				</tr>"&vbcrlf)
    Response.Write("			</form>"&vbcrlf)
    Code (markup):
    The values are passed from the previous page and are in place in current page, however when I query the form with the following code:

    CustID=Session.Contents("CustID")
    Response.Write(CustID&vbcrlf)
    Qty=Request.Form("Qty")
    Response.Write(Qty&vbcrlf)
    Code (markup):
    I get nothing for Qty

    What am I doing wrong?

    This is the site:

    http://hawksnuthouse.com

    Click on an image or select from the menus, Add Item to cart, you will now be on cart page, (first code snippet) change the qty of the item and you will see the result on the EditItem page(second code snippet)
     
    Sleeping Troll, Jul 7, 2008 IP
  2. helpbeam

    helpbeam Guest

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add a name=Qty to the form like this:

    Response.Write("			<form name='Item"&x&"' action='EditItem.asp' method='Post'>"&vbcrlf)
    Response.Write("			<tr>"&vbcrlf)
    Response.Write("				<td   bgcolor='#FFFFFF'>"&vbcrlf)
    Response.Write("				<a>"&vbcrlf)
    Response.Write("					<input type='text' id='Qty"&x&"' name=Qty value='"&Qty&"' size='3' maxlength='3'>"&vbcrlf)
    Response.Write("				</a>"&vbcrlf)
    Response.Write("				</td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Dsc"&x&"'>"&Dsc&"</a></td>"&vbcrlf)
    Response.Write("					<td width='1'><img id='Pic"&x&"' border=0 src='Images/Products/"&ProdID&".png' onload='this.style.height=20' onmouseover='this.style.height=150' onmouseout='this.style.height=20'></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ech"&x&"'>"&Ech&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ext"&x&"'>"&Ext&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Shp"&x&"'>"&Shp&"</a></td>"&vbcrlf)
    Response.Write("					<td height='20'><a id='Ttl"&x&"'>"&Ttl&"</a></td>"&vbcrlf)
    Response.Write("				</tr>"&vbcrlf)
    Response.Write("			</form>"&vbcrlf)
    Code (markup):
     
    helpbeam, Jul 8, 2008 IP
  3. salman4raza

    salman4raza Peon

    Messages:
    373
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <input type='text' id='Qty"&x&"' value='"&Qty&"' size='3' maxlength='3'>"&vbcrlf)


    you forget to add name='Qty' in above
     
    salman4raza, Jul 21, 2008 IP