Click here to Skip to main content
15,895,192 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to Pass the value from the database using session and redirect to another page

startexec Table as follows;

QpName BthID

REO 718


batch table as follows;

Bthid Bthno Course Attender

718 B84 REO SJ


Design screen as follows;


Batch No textbox

Course Dropdownlist

Question Paper Dropdownlist


i want to pass the Bth id value using session from startexec (table)
pass the Course value using session from Batch (table)

i have one button called Go. when i click that Go button it will redirect to another page.

for that how can i do using csharp?

please help me.

Regards,

Narasiman P.
Posted

1 solution

we cant use session to retrieve data from database. session is only used to store data and retrieve data in front end ..

for storing data
Session["BthID"]=textbox.text;
Session["Course"]=Dropdownlist.SelectedItem.Text;

on redirected page you can retrieve data by

string BthID=Session["BthID"].ToString();
string Course=Session["Course"].ToString();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900