English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

I guess you are talking about in Visual Studio. What you need to do is in the GridView page use the code similar to this to pick up one of the unique fields ( like product number in this example is row 1) and then send it to a new page ( in this example it's a page called ProductForm ) :

=======
Protected Sub gvProducts_
SelectedIndexChanged_
(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles gvProducts.SelectedIndexChanged
Dim strMovexCode As String
strMovexCode = _
Trim(gvProducts.SelectedRow._
Cells(1).Text)
Response.Redirect("ProductForm.aspx?pcp=" & strMovexCode)
End Sub
=======

I have added this so that it runs when you select an item in the gridview but you can instead add it to a button if you want.

Then, in your page ( ProductForm in this example ) add the following to the Page Load to bring up the information in a field ( PRODUCT_CODE in this example ):

=======
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Request.QueryString("pcp") <> "" Then
txtPRODUCT_CODE.Text = Request.QueryString("pcp")
End If
End If
Form.DataBind()
End Sub

=======

Sorry this is hard to explain but I hope that this helps. At least you will now have the keywords to search on.

2006-11-12 22:28:40 · answer #1 · answered by Dave N 2 · 0 0

You need more detail in your question. What application is this?

2006-11-09 09:21:56 · answer #2 · answered by Daniel R 6 · 0 0

fedest.com, questions and answers