DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 2 Aug 2007 14:07:44 -0600,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    magic kat
          2    dotnet_coder


Input type Submit?   
What's the equivalent in asp.net for the old "form method=post" using the 
submit.  I want to redirect to another page with parameters, but I don't 
want the parameters to be displayed in the url.  So I want to pass 
ClientName and ClientCompany to
www.mySite.com\p.asp?ClientName=John&ClientCompany="JDCo"

but I only want to display in the address bar www.mySite.com/p.asp
Date:Thu, 2 Aug 2007 14:07:44 -0600   Author:  

Re: Input type Submit?   
There are several ways to do this. One way is, put a ASP.NET Button
control on your page and then in the click event you could create
sessions and assign the parameters to the sessions. Then you would
response.redirect to the new page and check for the sessions.

Here is example code for the button click event (in C#):

--------
Session["MyParam1"] = "Hello";
Session["MyParam2"] = "World";

Response.Redirect("p.asp");
----------


Then to read the parameters on the receiving page you would do the
following to write them out on the screen:

----------------
string sParam1 = Session["MyParam1"].ToString();
string sParam2 = Session["MyParam2"].ToString();

Response.Write(sParam1 + " " + sParam2);
----------------

Result on Screen: Hello World
Date:Fri, 03 Aug 2007 00:02:33 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us