Click here to Skip to main content
15,905,912 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Sending Email in ASP.NET Pin
monu nair25-Sep-07 19:06
monu nair25-Sep-07 19:06 
AnswerRe: Sending Email in ASP.NET Pin
Jintal Patel26-Sep-07 3:16
Jintal Patel26-Sep-07 3:16 
GeneralRe: Sending Email in ASP.NET Pin
.NET- India 26-Sep-07 20:50
.NET- India 26-Sep-07 20:50 
GeneralRe: Sending Email in ASP.NET Pin
Jintal Patel28-Sep-07 0:01
Jintal Patel28-Sep-07 0:01 
Questionhow to get just one record in gridview [modified] Pin
newbieAl25-Sep-07 15:55
newbieAl25-Sep-07 15:55 
AnswerRe: how to get just one record in gridview Pin
Christian Graus25-Sep-07 16:33
protectorChristian Graus25-Sep-07 16:33 
GeneralRe: how to get just one record in gridview Pin
newbieAl26-Sep-07 2:21
newbieAl26-Sep-07 2:21 
AnswerRe: how to get just one record in gridview Pin
M_Menon26-Sep-07 7:35
M_Menon26-Sep-07 7:35 
Hi there,

If I am not wrong your task is to enter some ID through Textbox and then depending on it, you want to display some records in GridView.

I am not sure if using ObjectDatasource is best method.

Try this..

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try
Dim cmd As SqlCommand = New SqlCommand("CustOrderHist", New SqlConnection("Server=localhost;Database=Northwind;Trusted_Connection=True;"))
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Parameters.AddWithValue("CustomerID", txtCustID.Text)

cmd.Connection.Open()

gvwExample.DataSource = cmd.ExecuteReader()

gvwExample.DataBind()

cmd.Connection.Close()
cmd.Connection.Dispose()
Catch ex As Exception
lblStatus.Text = ex.Message
End Try

End Sub



I hope you can manage to change the code to c#...

I wish it helps you..
Still if you find any problem... please do write back

Big Grin | :-D


Cheers
Menon
GeneralRe: how to get just one record in gridview Pin
newbieAl26-Sep-07 9:06
newbieAl26-Sep-07 9:06 
Questionvirtual Reality Pin
ahemoudi25-Sep-07 12:44
ahemoudi25-Sep-07 12:44 
AnswerRe: virtual Reality Pin
Christian Graus25-Sep-07 13:26
protectorChristian Graus25-Sep-07 13:26 
GeneralRe: virtual Reality Pin
ahemoudi25-Sep-07 23:55
ahemoudi25-Sep-07 23:55 
QuestionLogin Default Button Pin
Jpuckett25-Sep-07 10:37
Jpuckett25-Sep-07 10:37 
AnswerRe: Login Default Button Pin
Jpuckett25-Sep-07 17:48
Jpuckett25-Sep-07 17:48 
AnswerRe: Login Default Button Pin
Venkatesh Mookkan25-Sep-07 20:29
Venkatesh Mookkan25-Sep-07 20:29 
QuestionOutside accsess Pin
Saksida Bojan25-Sep-07 10:32
Saksida Bojan25-Sep-07 10:32 
AnswerRe: Outside accsess Pin
Guffa25-Sep-07 10:53
Guffa25-Sep-07 10:53 
GeneralRe: Outside accsess Pin
Saksida Bojan25-Sep-07 11:10
Saksida Bojan25-Sep-07 11:10 
AnswerRe: Outside accsess Pin
Guffa25-Sep-07 11:19
Guffa25-Sep-07 11:19 
GeneralRe: Outside accsess Pin
Saksida Bojan25-Sep-07 11:37
Saksida Bojan25-Sep-07 11:37 
QuestionAjax With Custom Control Pin
Saksida Bojan25-Sep-07 10:02
Saksida Bojan25-Sep-07 10:02 
AnswerRe: Ajax With Custom Control Pin
Guffa25-Sep-07 10:49
Guffa25-Sep-07 10:49 
GeneralRe: Ajax With Custom Control Pin
Saksida Bojan25-Sep-07 10:57
Saksida Bojan25-Sep-07 10:57 
AnswerRe: Ajax With Custom Control Pin
Guffa25-Sep-07 11:03
Guffa25-Sep-07 11:03 
GeneralRe: Ajax With Custom Control Pin
Saksida Bojan25-Sep-07 11:06
Saksida Bojan25-Sep-07 11:06 

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.