473,804 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASpx to ASPx server control posting

Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I
get nothing.

--
Regards

Rob
Nov 18 '05 #1
3 1368
hi rob ,

maybe you can try not posting but putting your objects into the session and
call them from the other page.
for a better alternative you can try inheriting your web pages from the same
base class which has a protected method that reads/write into your variables
into the session.

"Rob Shorney" <Bi****@communi ty.nospam> wrote in message
news:58******** *************** ***********@mic rosoft.com...
Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I get nothing.

--
Regards

Rob

Nov 18 '05 #2
Hi Rob,

Forget about classic ASP. Except for the environment, everything is
different in ASP.Net. A WebForm is a form that posts back to itself. This is
the ASP.Net paradigm. There are other ways to pass data from one WebForm to
another, almost all of them on the Server Side. You can use Server.Transfer ,
and pass the entire HttpContext and present Page class to another WebForm.
You can generate an HTTP POST WebRequest. You can put a second form on a
Page, and use that to POST to the second WebForm. And several other
techniques, all of which are useful depending upon the situation.

If you treat ASP.Net like ASP (you CAN, but you SHOULD not), you will derive
no benefits from it. Learn the new paradigm, and leave the old behind. Once
you get used to it, you'll never want to look back again.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Rob Shorney" <Bi****@communi ty.nospam> wrote in message
news:58******** *************** ***********@mic rosoft.com...
Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I get nothing.

--
Regards

Rob

Nov 18 '05 #3
Hi,

Assuming I understood the question correctly, in ASP.NET 1.x, you cannot
post back to a different page, but to the same one (resursive posting). Even
if you explictly specify a different form in the <form> tag, it will be
ignored.

HTH.

"Rob Shorney" <Bi****@communi ty.nospam> wrote in message
news:58******** *************** ***********@mic rosoft.com...
Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I
get nothing.

--
Regards

Rob
Nov 18 '05 #4

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

Similar topics

5
5294
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table (table.ID is TestTable) On .aspx page: <HeaderTemplate> <asp:Table ID="TestTable" runat="Server" /> </HeaderTemplate>
12
12436
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank, 'height=200,width=400,status=no,toolbar=no, menubar=no,location=no resizable=no scrollable=no'); but I can't seem to invoke the client side script from within a Server Side Form. I know I can use the context with to Response.redirect or Server.transfer to return a
2
1371
by: andrewcw | last post by:
I have 2 frames - one with button and another with a grid How do I get a reference to the controls on the other webform ? From the one frame I can 'see the webform' fo the other frame, bit not the controls. A simple code snippet would help. MSDN subscriber - but I dont think its linking correctly. Thanks -- Andrew
8
6910
by: A.M | last post by:
Hi, I know that i can use Page.Request.Path to find what is the current page name. The problem is I can't access to Page object inside a user control. Is there any way that a user control access to the page class? Thanks Ali
9
2978
by: JohnSmith | last post by:
I suspect this is easy, but I have been stumped for a day trying to solve this.. I want to be able to have an unlimited number of aspx pages that all use the code in one class file. I want code in that class file to be able to read and write the controls on the aspx pages. For example, on all the aspx pages, I'll have a label named label1. From code in the class file, I want to be able to do something like label1.text = "hello world I...
4
2449
by: TWEB | last post by:
I think I may have an IIS / ASP.Net Configuration issue that I need some guidance with resolving. Here's the problem: a) I have a .stm file. b) I referenc a .aspx file on this .stm file using a server-side-include directive: <!-- include virtual="../../foobar.aspx"--> c)When the .stm file is rendered: The .aspx file is included, but it doesn't look like the ASP.NET engine is processing the page, because I see the raw
10
2449
by: ptass | last post by:
Hi In asp.net 2.0 an aspx files .cs file is a partial class and all works fine, however, I thought I’d be able to create another class file, call it a partial class and have that compile and load as a 3rd partial class. This would be handy so i can generate standard code into one of the partial classes, while having my custom code untouched
2
3735
by: mharness | last post by:
Hello, I've tried a number of examples showing how to read the properties of a user control from an aspx file where the code is on the html view of the form but I can't figure out how to read them from the aspx.vb. Can anyone tell me how to declare the user control in the aspx.vb file so that I can read the properties? I did add "Protected WithEvents UC1 As System.Web.UI.UserControl" to the component code behind form but that's the...
5
2883
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I am useing visual studio .net, the html and code are seperated. I have the following aspx code which has two user controls: <%@ Register TagPrefix="Subway" TagName="Peopleinfo" Src="Peopleinfo.ascx" %> <%@ Register TagPrefix="Subway"...
6
6131
by: Abel Chan | last post by:
Hi there, I am trying to use ASP.NET to populate list of files with hyper link from a specific directory. The following code works well but it populates the list to the top of the web page. I have header and footer defined on the web page. How could I write the list to the body session like a specific area, a table or a list box control? Thanks in advance.
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4314
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.