473,386 Members | 2,129 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,386 software developers and data experts.

how to open same form in two different ways

Hi

I am working on asp.net2.0. I have two pages : Default1.aspx and Default2.aspx.This Default2.aspx is basically an application form which allows the user to enter his details.I have also written code for retreiving data from the backend so that the form is filled with the details for editting purpose.Now in my Default1.aspx page i have two buttons:first button will take me to the default2.aspx page which will allow me to fill up details and the second button should take me to the same default2.aspx page but this one has the form filled up for editting.how do i do this?I dont want to have two different default pages for doing this because that will make me have a lot of pages for my web application.instead is there a way for me to do this?Please help me out!!!
Thanking in advance.
Aug 16 '07 #1
1 1317
prabunewindia
199 100+
hi rekha,
u can pass his user id (primary key field in database) thru querystring.
and get the query string value in the next page and if it is null then just
leave it for blank and if it have any value, then fill it ya.

Response.Redirect("default2.aspx?userID=5");

get it by:
if(Convert.ToInt32(Context.QueryString.Get("userID ")!=0)
{
int userID=(Convert.ToInt32(Context.QueryString.Get("u serID");
//fill fields by getting data from database
}
else
{
//just leave it as blank
}

Prabu

Hi

I am working on asp.net2.0. I have two pages : Default1.aspx and Default2.aspx.This Default2.aspx is basically an application form which allows the user to enter his details.I have also written code for retreiving data from the backend so that the form is filled with the details for editting purpose.Now in my Default1.aspx page i have two buttons:first button will take me to the default2.aspx page which will allow me to fill up details and the second button should take me to the same default2.aspx page but this one has the form filled up for editting.how do i do this?I dont want to have two different default pages for doing this because that will make me have a lot of pages for my web application.instead is there a way for me to do this?Please help me out!!!
Thanking in advance.
Aug 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Steven T. Hatton | last post by:
I've finally gotten around to reading Accelerated C++ by Andrew Koenig and Barbara Moo. There's a lot of good stuff in what I've read so far. Even though it is _very_ basic, they present some...
4
by: Timothy Madden | last post by:
Hello all I have a little problem and I hope it is simple. I have a form on my page and I have to open a pop-up window with the page serverd after the form submit. I know I can compose the URL...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
115
by: TheAd | last post by:
At this moment I use MsAccess and i can build about every databound application i want. Who knows about a serious open source alternative? Because Windows will be a client platform for some time, i...
8
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn = 22)" Me.recordsource = "dbo.sproc123" But I...
2
by: OutdoorGuy | last post by:
Greetings, I have a "newbie" question in relation to opening files from C#. I have a Windows form where I allow the user to type in a file extension in a text box (e.g., "xls"). I then take...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am thinking about doing this since I got several cases that some of our internal users open more than one browser at the same time from our server. When one of the transactions was not...
5
by: BD | last post by:
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one...
3
by: bsturg21 | last post by:
Hello, I have a windows form that has a series of linklabels on it, and I need to have each linklabel, when clicked, open a separate windows form that has a single paramter passed into it. The...
6
by: Thom Little | last post by:
Using C# 3.5 I have a form that calls many other sub-forms. Typically there will be five forms open at the same time. If the main form is closed all the sub forms are also closed. Is there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: 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
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.