C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




sqlserver urgently....


Posted Date: 05 Jul 2008      Total Responses: 3

Posted By: sathya       Member Level: Gold     Points: 1



hai,

i used this query
my concepts:
i put within textbox(name or city or education) value will pass to the next page so what to do?

select * from <tableName> where name like '%textboxvalue%' or city like '%textboxvalue%' or education like '%textboxvalue%'

if i want pass (name or city or education)value to the next page.

so how to pass?


pl help me

Regards
suji





Responses

Author: Sujit Kumar    05 Jul 2008Member Level: DiamondRating:     Points: 6

you can pass value to next page through session or querystring

1. using session simply put value in session object and retrieve value in next page like:
//on first page.
Session["name"]=txtname.Text;
Session["city"]=txtcity.Text;
Session["education"]=txtedu.Text;
//on second page you can retrieve value from session like:
string name=Session["name"].tostring();
string city=Session["city"].tostring();
string education=Session["education"].tostring();

2. using querystring you can pass value like:
//on first page
response.redirect("page2.aspx?name="+txtname.text+"&city="+txtcity.text+"&education="+txtedu.text);

//on second page to retrieve value from querystring :

string name=Request.QueryString["name"].tostring();
string city=Request.QueryString["city"].tostring();
string education=Request.QueryString["education"].tostring();




Author: Sri Harsha    05 Jul 2008Member Level: SilverRating:     Points: 6

HI,

You can pass the values to next page using QueryString or Sessions.



One approach is store all the values in Sessions ,so that you can retrieve these values in the next page.
Session["Name"] = txtName.Text;
Session["City"] = txtCity.Text;
Session["Education"] = txtEdut.Text;

and in the second page you can get the session values like this
string Name=Session["Name"];
string City=Session["City"];
string Edu=Session["Education"];


and the second approach is with Query string
You can append all the values with the url to whcih you are redirecting.

Ex : string url = "QueryStringRecipient.aspx?";
url += "Name=" + txtName.Text + "&";
url += "City=" + txtCity.Text + "&";
url += "Edu=" + txtEdut.Text ;

Response.Redirect(url);



Author: tushqi    05 Jul 2008Member Level: SilverRating:     Points: 6

You can pass the values to next page using QueryString or Sessions.



One approach is store all the values in Sessions ,so that you can retrieve these values in the next page.
Session["Name"] = txtName.Text;
Session["City"] = txtCity.Text;
Session["Education"] = txtEdut.Text;

and in the second page you can get the session values like this
string Name=Session["Name"];
string City=Session["City"];
string Edu=Session["Education"];


and the second approach is with Query string
You can append all the values with the url to whcih you are redirecting.

Ex : string url = "QueryStringRecipient.aspx?";
url += "Name=" + txtName.Text + "&";
url += "City=" + txtCity.Text + "&";
url += "Edu=" + txtEdut.Text ;

Response.Redirect(url);

i used it but it is not working
u must check it



Post Reply
You must Sign In to post a response.
Next : SqlTransaction Object
Previous : Want to know more
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use