473,385 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using the post method

Des
I have read that the way I have to read a text box from another page
has changed. I have a form using the post method I am constructing the
name of the text box using a recordset field.

<td WIDTH="60"><input type="text" name="<%=Cstr(rs("ItemID"))%>"
size="1" maxlength="2" value="<%=rs("Quantity")%>"></td>

View as text works with the name of the text box as name="Q2" 2 being
the record number

the form I am calling has the following

Dim ID as integer
Dim tmp as string
Dim Quantity as string

ID = request("item") ' Get Record number
tmp = "Q" & cstr(ID) ' Preceed with letter Q
response.write("Text Box Name = " & tmp & "<br>")

Quantity = request(tmp) ' Get value of text Box
response.write("Value = " & Quantity)

I have the imports

<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<%@ Import namespace="System.Web.UI" %>
<%@ Import namespace="System.Web.UI.WebControls" %>

Is there something missing in the way .NET does things

Feb 27 '06 #1
1 1032
The norm in .NET is to have the page post back to itself. In ASP.NET 2.0, you
have more options, as you can pull from a previous page when posting back to
a different page (not present in 1.x).

If you are moving from classic ASP, you would be wise to retool the page to
postback to itself and make the paradigm shift.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Des" wrote:
I have read that the way I have to read a text box from another page
has changed. I have a form using the post method I am constructing the
name of the text box using a recordset field.

<td WIDTH="60"><input type="text" name="<%=Cstr(rs("ItemID"))%>"
size="1" maxlength="2" value="<%=rs("Quantity")%>"></td>

View as text works with the name of the text box as name="Q2" 2 being
the record number

the form I am calling has the following

Dim ID as integer
Dim tmp as string
Dim Quantity as string

ID = request("item") ' Get Record number
tmp = "Q" & cstr(ID) ' Preceed with letter Q
response.write("Text Box Name = " & tmp & "<br>")

Quantity = request(tmp) ' Get value of text Box
response.write("Value = " & Quantity)

I have the imports

<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<%@ Import namespace="System.Web.UI" %>
<%@ Import namespace="System.Web.UI.WebControls" %>

Is there something missing in the way .NET does things

Feb 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Sparks | last post by:
Anyway... At Europython Guido discussed with everyone the outstanding issue with decorators and there was a clear majority in favour of having them, which was good. From where I was sitting it...
7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
3
by: Paul M | last post by:
Hi Sorry if this is posted in the wrong group but I'm brand new to this area. Basically I've got to post some XML documents to an external server using HTTP web request (POST, not GET) and be able...
4
by: Kevin Phifer | last post by:
Ok, before anyone freaks out, I have a solution I need to create that gathers content from maybe different places. Each one can return a <form> in the html, so its the classic can't have more than...
0
by: Ricardo Magalhaes | last post by:
Hi, I have an ASPX page and I need to call an ASP page sending parameters like Name, Adress, ie. using POST method. This next ASP page show payment informations.. If was from an ASP to...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
2
by: David | last post by:
Hello all, I have a web method that accepts compound (non-primitive) arguments. I know that the method should be applied using SOAP protocol. One of my clients does not know how to sent SOAP...
4
by: davidfahy | last post by:
Hi all How can I transfer user to another server using POST. The problem is that Server.Transfer (preserves form data) works just in current server. Response.Redirect - uses GET method. However...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
1
by: WeCi2i | last post by:
Okay, I have a problem that has been stumping me for weeks. I have tried many different solutions and this is pretty much my last resort. I have seen a lot of good answers give here so I figured I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.