Click here to Skip to main content
15,923,374 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Can we use 2 Server-Side scripting languages? Pin
Rhys Gravell12-Mar-07 0:26
professionalRhys Gravell12-Mar-07 0:26 
QuestionServer or Client is accessing Web application ? Pin
md Nazeem11-Mar-07 20:36
md Nazeem11-Mar-07 20:36 
AnswerRe: Server or Client is accessing Web application ? Pin
Venkatesh Mookkan11-Mar-07 21:30
Venkatesh Mookkan11-Mar-07 21:30 
QuestionRadgrid problem--urgent Pin
chatrathi11-Mar-07 20:31
chatrathi11-Mar-07 20:31 
QuestionPaging Pin
Khan.Bangash11-Mar-07 20:10
Khan.Bangash11-Mar-07 20:10 
AnswerRe: Paging Pin
N a v a n e e t h11-Mar-07 20:18
N a v a n e e t h11-Mar-07 20:18 
AnswerRe: Paging Pin
Harini N K11-Mar-07 20:44
Harini N K11-Mar-07 20:44 
GeneralRe: Paging Pin
Khan.Bangash11-Mar-07 21:05
Khan.Bangash11-Mar-07 21:05 
I have called this event in Page Load Event.
Public Sub DgBound()
Try
If (Conn.State <> ConnectionState.Open) Then
Conn.Open()
End If
strQry = "Select cust_order.order_id as order_id, cust_order.customer_id as cust_id, cust_order.order_date as order_date, customers.fname as fname, customers.lname as lname from cust_order, customers, cust_order_ship where cust_order.customer_id = customers.customer_id and cust_order.order_id = cust_order_ship.order_id"
Command = New OleDbCommand
With Command
.Connection = Conn
.CommandText = strQry
.CommandType = CommandType.Text
End With
da = New OleDbDataAdapter(strQry, Conn)
da.SelectCommand = Command
ds = New DataSet
da.Fill(ds, "cust")
dgProfit.DataSource = ds
dgProfit.DataBind()
totalreclbl.Text = ds.Tables(0).Rows.Count
Catch ex As Exception
Response.Write(ex.ToString)
Finally
Conn.Close()
End Try
End Sub
Then I have used this event in Search
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Try
If (Conn.State <> ConnectionState.Open) Then
Conn.Open()
End If
strQry = "Select cust_order.order_id as order_id, cust_order.customer_id as cust_id, cust_order.order_date as order_date, customers.fname as fname, customers.lname as lname from cust_order, customers, cust_order_ship where cust_order.customer_id = customers.customer_id and cust_order.order_id = cust_order_ship.order_id and cust_order.order_date >=#" & ViewState("startDate") & "# and cust_order.order_date <=#" & ViewState("endDate") & "#"
Command = New OleDbCommand
With Command
.Connection = Conn
.CommandText = strQry
.CommandType = CommandType.Text
End With
Command2 = New OleDbCommand(strQry, Conn)
total = Command2.ExecuteReader()
If Not total.Read() Then
lblMsg.Visible = True
Else
lblMsg.Visible = False
End If
da = New OleDbDataAdapter(strQry, Conn)
da.SelectCommand = Command
ds = New DataSet
da.Fill(ds)
dgProfit.CurrentPageIndex = 0
dgProfit.DataSource = ds
totalreclbl.Text = ds.Tables(0).Rows.Count
dgProfit.DataBind()
btnBack.Visible = True
totVatSubSearch()
txtStart.Text = ""
txtEnd.Text = ""
Catch ex As Exception
Response.Write(ex.ToString)
Finally
Conn.Close()
End Try
End Sub
My Page Cahange event is here
Protected Sub dgOrder_PageChange(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs)
dgProfit.CurrentPageIndex = e.NewPageIndex
DgBound()
End Sub

Now where should I change my code.
GeneralRe: Paging Pin
N a v a n e e t h11-Mar-07 21:17
N a v a n e e t h11-Mar-07 21:17 
GeneralYour query is insecure Pin
N a v a n e e t h11-Mar-07 21:23
N a v a n e e t h11-Mar-07 21:23 
GeneralRe: Paging Pin
Harini N K11-Mar-07 22:03
Harini N K11-Mar-07 22:03 
QuestionWhy don't you use two function ? Pin
N a v a n e e t h11-Mar-07 22:31
N a v a n e e t h11-Mar-07 22:31 
AnswerRe: Why don't you use two function ? Pin
Harini N K11-Mar-07 22:38
Harini N K11-Mar-07 22:38 
AnswerRe: Why don't you use two function ? Pin
N a v a n e e t h11-Mar-07 21:55
N a v a n e e t h11-Mar-07 21:55 
GeneralRe: Why don't you use two function ? Pin
Harini N K11-Mar-07 22:56
Harini N K11-Mar-07 22:56 
QuestionRe: Why don't you use two function ? Pin
N a v a n e e t h11-Mar-07 23:02
N a v a n e e t h11-Mar-07 23:02 
GeneralRe: Paging Pin
Khan.Bangash11-Mar-07 21:09
Khan.Bangash11-Mar-07 21:09 
GeneralRe: Paging Pin
Khan.Bangash11-Mar-07 21:22
Khan.Bangash11-Mar-07 21:22 
GeneralRe: Paging Pin
N a v a n e e t h11-Mar-07 21:26
N a v a n e e t h11-Mar-07 21:26 
QuestionMail Room Pin
Tech_spidy11-Mar-07 18:59
Tech_spidy11-Mar-07 18:59 
AnswerRe: Mail Room Pin
N a v a n e e t h11-Mar-07 20:02
N a v a n e e t h11-Mar-07 20:02 
GeneralRe: Mail Room Pin
Tech_spidy11-Mar-07 20:24
Tech_spidy11-Mar-07 20:24 
AnswerRe: Mail Room Pin
badgrs11-Mar-07 23:32
badgrs11-Mar-07 23:32 
QuestionInfragistics Web Grid. [modified] Pin
max_panky11-Mar-07 19:00
max_panky11-Mar-07 19:00 
Questionverious ways of generating report Pin
mohd imran abdul aziz11-Mar-07 18:58
mohd imran abdul aziz11-Mar-07 18:58 

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.