Click here to Skip to main content
15,914,071 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDisplay of checkbox Pin
Kissy164-Oct-06 23:06
Kissy164-Oct-06 23:06 
QuestionGridView Pin
AnhTin4-Oct-06 22:45
AnhTin4-Oct-06 22:45 
AnswerRe: GridView Pin
minhpc_bk5-Oct-06 15:49
minhpc_bk5-Oct-06 15:49 
GeneralRe: GridView Pin
AnhTin5-Oct-06 17:57
AnhTin5-Oct-06 17:57 
QuestionWeb page authentication using Active Directory [modified] Pin
isaii4-Oct-06 22:21
isaii4-Oct-06 22:21 
AnswerRe: Web page authentication using Active Directory Pin
minhpc_bk5-Oct-06 15:27
minhpc_bk5-Oct-06 15:27 
GeneralRe: Web page authentication using Active Directory Pin
isaii12-Oct-06 22:25
isaii12-Oct-06 22:25 
Questionproblem in displaying searched records Pin
asifbhura4-Oct-06 21:16
asifbhura4-Oct-06 21:16 
Hi
given below code is to display searched records.

problem is that it displays correctly in only first page.

when i click next.it displays all records.

such as if would search job:Developer and country:USA.

it displays correctly in only on first page.when i click on next. it displays all records from all country and all job.

please help me out


string jobs = txtjob.Text;
string jobsdesc = ddcoun.SelectedValue ;

string sqlstmt = "select * from employer_eng where ( job LIKE '%" + jobs +"%' or job_desc LIKE '%" + jobs +"%' ) And cou_name_ar='" + jobsdesc + "'" + " "+ "And" + " " + "approval='Y'";
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["DBConnection"]);


SqlCommand cmd = new SqlCommand(sqlstmt ,conn);

conn.Open();
//conn.Open();
//DataGrid1.DataSource = cmd.ExecuteReader(CommandBehavior.CloseConnection);
//DataGrid1.DataBind();
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds=new DataSet();
sda.Fill(ds);
PagedDataSource pgds1 = new PagedDataSource();
pgds1.DataSource = ds.Tables[0].DefaultView;
pgds1.AllowPaging = true;
pgds1.PageSize = 10;
int CurPage;
if (Request.QueryString["Page"] != null)
CurPage=Convert.ToInt32(Request.QueryString["Page"]);
else
CurPage=1;

pgds1.CurrentPageIndex = CurPage-1;

lblsearch.Text = "Page: " + CurPage.ToString();

if (!pgds1.IsFirstPage)
searchp.NavigateUrl=Request.CurrentExecutionFilePath
+ "?Page=" + Convert.ToString(CurPage-1) + "&j=" + jobs + "&d=" + jobsdesc;

if (!pgds1.IsLastPage)
searchn.NavigateUrl=Request.CurrentExecutionFilePath
+ "?Page=" + Convert.ToString(CurPage+1) + "&j=" + jobs + "&d=" + jobsdesc;


repsearch.DataSource = pgds1;
repsearch.DataBind();

cmd.Dispose();
conn.Close();
AnswerRe: problem in displaying searched records Pin
just3ala24-Oct-06 21:59
just3ala24-Oct-06 21:59 
QuestionRegarding Constructing Regular Expression Pin
VishalSharmaDev4-Oct-06 21:14
VishalSharmaDev4-Oct-06 21:14 
AnswerRe: Regarding Constructing Regular Expression Pin
minhpc_bk5-Oct-06 15:25
minhpc_bk5-Oct-06 15:25 
QuestionHow to Set the URL befor PostBack (Passing Data in URL) [modified] Pin
Jay_se4-Oct-06 20:52
Jay_se4-Oct-06 20:52 
AnswerRe: How to Set the URL befor PostBack (Passing Data in URL) Pin
just3ala24-Oct-06 22:01
just3ala24-Oct-06 22:01 
AnswerRe: How to Set the URL befor PostBack (Passing Data in URL) [modified] Pin
Jay_se4-Oct-06 22:14
Jay_se4-Oct-06 22:14 
QuestionHow to temporarly suspend the server execution Pin
srilu nagalla4-Oct-06 20:41
srilu nagalla4-Oct-06 20:41 
AnswerRe: How to temporarly suspend the server execution Pin
minhpc_bk5-Oct-06 15:17
minhpc_bk5-Oct-06 15:17 
QuestionDate formate in asp.net using C# Urgent!!!!! [modified] Pin
Aashutoshkumar4-Oct-06 20:33
Aashutoshkumar4-Oct-06 20:33 
AnswerRe: Date formate in asp.net using C# Urgent!!!!! Pin
minhpc_bk5-Oct-06 15:14
minhpc_bk5-Oct-06 15:14 
GeneralRe: Date formate in asp.net using C# Urgent!!!!! Pin
Aashutoshkumar7-Oct-06 1:46
Aashutoshkumar7-Oct-06 1:46 
GeneralRe: Date formate in asp.net using C# Urgent!!!!! Pin
minhpc_bk9-Oct-06 17:02
minhpc_bk9-Oct-06 17:02 
Questionhow to get the user's loginid Pin
BSRK4-Oct-06 20:33
BSRK4-Oct-06 20:33 
AnswerRe: how to get the user's loginid Pin
minhpc_bk5-Oct-06 15:10
minhpc_bk5-Oct-06 15:10 
AnswerRe: how to get the user's loginid Pin
laocat20036-Oct-06 4:58
laocat20036-Oct-06 4:58 
QuestionDataGrid Pin
ptvce4-Oct-06 20:26
ptvce4-Oct-06 20:26 
AnswerRe: DataGrid Pin
Jay_se4-Oct-06 20:34
Jay_se4-Oct-06 20:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.