在下一页找到搜索结果 [英] find the search result in next page

查看:63
本文介绍了在下一页找到搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要这样的网站页面,


我有一个具有关键技能,位置,exp文本框和搜索按钮的页面,并且我希望搜索结果在数据列表的下一页上,

我如何对此进行查询,
所以请帮助我.

i want my website page like this,


i have one page with key skill, location, exp textboxes and search button and i want the search result on next page in datalist,

how can i fire query for this,
so plz help me.

推荐答案

在按钮上单击搜索.
Response.Redirect到新页面,页面加载时就可以编写搜索逻辑..

使用session或Request.QueryString可以将所有值从一种形式传递给另一种形式.
On button search click..

Response.Redirect into new page there on page load you can write the Search logic..

Using session or Request.QueryString yoy can pass all values from one form to another...


在单击按钮时,重定向到下一页时,使用session或querystring并为其设置数据.并在下一页访问会话或查询字符串数据,并使用这些数据创建查询并将该查询结果绑定到datlist.
使用QueryString
on button click when you redirect to next page use session or querystring and set data to them. and acces session or querystring data on next page and using these data create your query and bind this query result to datlist.
using QueryString
Response.Redirect("UrNextPageName.aspx?QryStr1="+textbox1.Text +"&QryStr2="+textbox2.Text +");



使用会话



using session

Session["UrSessionName1"] =textbox1.Text;
Session["UrSessionName2"] =textbox2.Text;



urNextPage上的PageLoad事件访问这些数据



on urNextPage PageLoad Event access thses data

string res1= Request.QueryString["QryStr1"].ToString();


或会话


or session

string res1=Session["UrSessionName1"].ToString();


您需要使用一种状态管理技术来实现它:
MSDN:ASP.NET状态管理概述 [ ASP.NET中的状态管理-1 [ ASP.Net状态管理技术-2 [
You need to use one of the state management techniques to implement it:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]


这篇关于在下一页找到搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆