Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2006, 06:04 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with "server.transfer" (maybe)

hi,

i made a web application that consist of 3 web forms.
The "page1.aspx" is the next:
 
Code:
public class Search : System.Web.UI.Page
Code:
{
protected System.Web.UI.WebControls.DropDownList lstStartingFrom2;
protected System.Web.UI.WebControls.TextBox txtDepartureDate2;
protected System.Web.UI.WebControls.DropDownList lstDestination2;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
private void btnSearch_Click(object sender, System.EventArgs e)
{
Server.Transfer("page2.aspx");
}
}

The "page2" ,that processes the parameteres i put in "page1" when i click the btnSearch button,is the next:
Code:
public class SearchResults : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;
private void Page_Load(object sender, System.EventArgs e)
{

findqosmax.FindQoSMaxim qosobject=new findqosmax.FindQoSMaxim();//make an object of a web service
int[] arr2=qosobject.SearchTrainQoSMaxima(); //call the method of the web sevice
int delay2=arr2[0];
Session["train_ws_ID"]=Convert.ToString(arr2[1]);
train.Service1 trainservice=new train.Service1();//make another one web service
DataSet searchtrainset= trainservice.SearchTrain (Request.Form["lstStartingFrom2"],
Request.Form["lstDestination2"],Convert.ToDateTime(Request.Form["txtDepartureDate2"]),delay2);
DataGrid2.DataSource=searchtrainset.Tables[0].DefaultView;
DataGrid2.DataBind();
}
private void Button1_Click(object sender, System.EventArgs e)
{
Server.Transfer("page3.aspx",true);
}
}
While the DataGrid2 takes the data from the database and returns the results ,however,when i try to click the button in "page2" in order to call the "page3.aspx" ,then appear the next error:

Code:
System.Web.Services.Protocols.SoapException: Server was unable to process request.
 ---> System.Data.SqlTypes.SqlTypeException: 
 SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
 12/31/9999 11:59:59 PM. at TrainService.Service1.SearchTrain(String startPlace, String destinationPlace,
 DateTime departureDate, Int32 timeDelay) in c:\inetpub\wwwroot\trainservice\service1.asmx.cs:line 127 ---
 End of inner exception stack trace ---



I beleieve that there isn't something wrong in datetimes ,because ,the methods of web services are called without problem in "page2.aspx" .The problem is only when i want to click the button in "page2.aspx" ,in order to call the "page3.aspx"

Thank you in advanced.
Sorry for my bad english!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
server.transfer and XML spinout ASP.NET 1.0 and 1.1 Basics 1 March 26th, 2008 08:21 AM
Crosspagepostback and Server.Transfer preetakrish ASP.NET 1.x and 2.0 Application Design 1 March 17th, 2008 06:29 AM
Server.Transfer Sheraz Khan ASP.NET 2.0 Basics 1 July 28th, 2007 05:17 AM
Transfer Data from one server to another server Jane SQL Server 2000 2 February 28th, 2005 03:15 AM
SSL and server.transfer shs BOOK: Beginning ASP.NET 1.0 2 September 1st, 2004 09:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.