473,378 Members | 1,236 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,378 software developers and data experts.

pass value selected from a dropdownlist to other page+and other related data .

5
hi all,
can u please tell me what is the code to select a value from a dropdownlist ..and then passs this value to the other page ....
along with it i have to take some details from the database based on the value from the dropdownlist and pass it to the other page .
iknow how to pass a data to a new page ..


Response.Redirect("desplayprofile.aspx?myid=" + ddl1.SelectedItem .ToString () );

and on the other page in the page_load event type
this.txtuserid.Text = Request.QueryString[0];
Jun 4 '07 #1
7 6650
dip_developer
648 Expert 512MB
hi all,
can u please tell me what is the code to select a value from a dropdownlist ..and then passs this value to the other page ....
along with it i have to take some details from the database based on the value from the dropdownlist and pass it to the other page .
iknow how to pass a data to a new page ..


Response.Redirect("desplayprofile.aspx?myid=" + ddl1.SelectedItem .ToString () );

and on the other page in the page_load event type
this.txtuserid.Text = Request.QueryString[0];
You khow everything...then whats the problem.....
I did not understand
Jun 4 '07 #2
tomari
5
You khow everything...then whats the problem.....
I did not understand
i have to take suppose name from the dropdownlist....
now on the second page i have to put this name ,also the corresponding emailid,roll no ...etc etc in different text boxes ...
i wrote a query for it ...but this query is coming in those boxes(on the second page )not the values.
Jun 4 '07 #3
kenobewan
4,871 Expert 4TB
Why don't you post the value and request on the other page?
Jun 4 '07 #4
tomari
5
Why don't you post the value and request on the other page?
and how do we do that ????
Jun 6 '07 #5
dip_developer
648 Expert 512MB
and how do we do that ????

Only pass the ID of the employee with the query string to the next page....
In the other page in Page_Load event make a query with that perticular ID....and populate textbox or datagrid or anything you want with those records
Jun 6 '07 #6
tomari
5
Only pass the ID of the employee with the query string to the next page....
In the other page in Page_Load event make a query with that perticular ID....and populate textbox or datagrid or anything you want with those records
can u pls send the query ..
Jun 6 '07 #7
dip_developer
648 Expert 512MB
hi all,
can u please tell me what is the code to select a value from a dropdownlist ..and then passs this value to the other page ....
along with it i have to take some details from the database based on the value from the dropdownlist and pass it to the other page .
iknow how to pass a data to a new page ..


Response.Redirect("desplayprofile.aspx?myid=" + ddl1.SelectedItem .ToString () );

and on the other page in the page_load event type
this.txtuserid.Text = Request.QueryString[0];
You are getting the value of Employee ID in the new page by

String empID=Request.QueryString["myid"];

Now In the second page simply make a Sql Query(in the Page_Load event) which will look like

SELECT emp_name,e-mail,emp_address FROM myTable Where Empid='"& empID &"'
Jun 6 '07 #8

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

Similar topics

1
by: vishal | last post by:
hi i am using get method to pass data from one form to another and my value may contain & symbol. so when this is case the value after & sign is truncated which is logically true. so what...
5
by: vishal | last post by:
when a user clicks on a hyperlink i want to pass data to linked page. but what i want is that this data should not be visible to user. i mean is there any way that i can pass data except get method...
9
by: Frank Rizzo | last post by:
I've got a number of user controls on the web page. How can I pass some data to it? I don't see where the user control is instantiated in the page code-behind page. Thanks.
0
by: sklett | last post by:
I'll try asking this a different way. If I have a bound DropDownList and a Button on a page. When I hit the button it causes a postback. The DropDownList does not get re-bound on the postback,...
8
by: darrel | last post by:
I'm still trying to fully understand how best to pass variables between pages/usercontrols/each other. On a current site I've done, I've had one userControl do the logic and set the variable,...
2
by: Scott | last post by:
If I click the "Update" button on my form below, I can retrieve the value of my combo by using code in the FORM RESULTS section below. Therefore, if I choose the "Inside" option in my combo, I...
0
by: sravan_reddy001 | last post by:
i found the folloling error message when tried to administer the login control of the webpage:: There is a problem with your selected data store. This can be caused by an invalid server name or...
0
by: svgeorge | last post by:
I have web pages for making several 9 type of payments. The data gets loaded on web page from SQL server 2005 database. Then I have Process payment button(ProcPaymBTM_Click) on the web page(Detail...
2
by: pqsoftware | last post by:
I need to pass data from one web page to another. For example I have 10 products, when the user clicks the price of the product I need to load a new page which can display data from the first page...
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: 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
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
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
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.