Click here to Skip to main content
16,005,181 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Updation problem Pin
n_gchaitra24-Jul-07 1:34
n_gchaitra24-Jul-07 1:34 
QuestionAny Boday can explain me the Web Farm in ASP.NET 2.0 Pin
veeranjaneya24-Jul-07 0:17
veeranjaneya24-Jul-07 0:17 
AnswerRe: Any Boday can explain me the Web Farm in ASP.NET 2.0 Pin
Christian Graus24-Jul-07 1:08
protectorChristian Graus24-Jul-07 1:08 
QuestionProblem with gridview Pin
indiaone24-Jul-07 0:04
indiaone24-Jul-07 0:04 
AnswerRe: Problem with gridview Pin
kubben24-Jul-07 1:59
kubben24-Jul-07 1:59 
QuestionSEO and Folder Structuring Pin
JacquesDP23-Jul-07 23:37
JacquesDP23-Jul-07 23:37 
AnswerRe: SEO and Folder Structuring Pin
munklefish25-Jul-07 5:32
munklefish25-Jul-07 5:32 
QuestionSorting Pin
Khan.Bangash23-Jul-07 23:30
Khan.Bangash23-Jul-07 23:30 
Hi All
I m using asp.net with vb.net. There s a DataGrid Control on my page, There is a column Customer Name who's Text is set as below.
in aspx page
<asp:Label ID="custnamelbl" runat="server" Text='<%# setcustomername(container.dataitem("order_id")) %>' ></asp:Label>

Look at its Text property how it is set.
And the code of setcustomername sub is as follow.
Function setcustomername(ByVal orderid As Integer) As String
SelectQuery = "SELECT customers.customer_id,customers.customer_type, customers.fname, customers.lname FROM customers INNER JOIN cust_order ON customers.customer_id=cust_order.customer_id WHERE cust_order.order_id=" & orderid & ""
selectcommand = New OleDbCommand(SelectQuery, Conn)
total = selectcommand.ExecuteReader()
While total.Read()
If Not total.IsDBNull(0) Then
cuid = total.getvalue(0)
End If
If Not total.IsDBNull(1) Then
cusType = total.getvalue(1)
End If
If Not total.IsDBNull(2) Then
first = total.getvalue(2)
End If
If Not total.IsDBNull(3) Then
last = total.getvalue(3)
End If
End While
If cusType = 1 Then
camp_name = ""
SelectQuery = "SELECT comp_name FROM biz_cust_extra WHERE customer_id=" & cuid & ";"
selectcommand = New OleDbCommand(SelectQuery, Conn)
total = selectcommand.ExecuteReader()
While total.Read()
If Not total.IsDBNull(0) Then
camp_name = total.getvalue(0)
Else
camp_name = ""
End If
End While
Return camp_name
Else
Return first & " " & last
End If
End Function

U can see that if customer is business customer then its company name will b displayed, if it is end user then its name will b displayed. Now the column will have either name or company name. I want to Sort this column when some one click on its header.
Can any one tell me how to do that. Its realy very urgent. Pls Help me.

thanks in Advance.
AnswerRe: Sorting Pin
Christian Graus23-Jul-07 23:33
protectorChristian Graus23-Jul-07 23:33 
QuestionPlace transparent image in crystal report Pin
teddddddddddd23-Jul-07 23:13
teddddddddddd23-Jul-07 23:13 
QuestionFile opening problem Pin
gvanto23-Jul-07 23:03
gvanto23-Jul-07 23:03 
AnswerRe: File opening problem Pin
Christian Graus23-Jul-07 23:28
protectorChristian Graus23-Jul-07 23:28 
GeneralRe: File opening problem Pin
gvanto24-Jul-07 0:14
gvanto24-Jul-07 0:14 
QuestionFormating the text in the lable Pin
.NET- India 23-Jul-07 22:44
.NET- India 23-Jul-07 22:44 
AnswerRe: Formating the text in the lable Pin
Christian Graus23-Jul-07 23:29
protectorChristian Graus23-Jul-07 23:29 
QuestionPieChat Pin
devsam23-Jul-07 22:24
devsam23-Jul-07 22:24 
AnswerRe: PieChat Pin
Christian Graus23-Jul-07 23:31
protectorChristian Graus23-Jul-07 23:31 
QuestionRun flash file Pin
.NET- India 23-Jul-07 22:14
.NET- India 23-Jul-07 22:14 
AnswerRe: Run flash file Pin
Christian Graus23-Jul-07 22:15
protectorChristian Graus23-Jul-07 22:15 
AnswerRe: Run flash file Pin
Mubashir Javaid23-Jul-07 22:45
Mubashir Javaid23-Jul-07 22:45 
QuestionShow/Hide Validators from client side Pin
samerh23-Jul-07 21:41
samerh23-Jul-07 21:41 
AnswerRe: Show/Hide Validators from client side Pin
Christian Graus23-Jul-07 21:49
protectorChristian Graus23-Jul-07 21:49 
GeneralRe: Show/Hide Validators from client side Pin
samerh23-Jul-07 22:02
samerh23-Jul-07 22:02 
GeneralRe: Show/Hide Validators from client side Pin
Christian Graus23-Jul-07 22:16
protectorChristian Graus23-Jul-07 22:16 
QuestionIs it required to open and close the data connection for every database operation? Pin
Mic Mathi23-Jul-07 21:25
Mic Mathi23-Jul-07 21:25 

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.