Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Hyperlink Problem 2

Status
Not open for further replies.

mulema

Technical User
Nov 16, 2002
32
US
My DataGrid hyperlink works correctly after following the help from this forum. When I click on the hyperlink on the datagrid Column, it reads and transfers my ID# to Form2.and populates my textboxes correctly.

My problem is that, this action opens Form2 on a new browser. So I have Form1 and Form2 browsers sitting on my status bar. If I open Form1 and select another record's hyperlink, a third Form2 browser opens up again. It goes on and on.

How can I better code this to stop this from happening?

To go to Form2 I have the following code-behind on Form1's HyperLink :
Private Sub NewDataGrid_SelectedIndexChanged (...)
Dim strRedirect As Integer
strRedirect = "GetForm1.aspx?ID#"
Response.Redirect(strRedirect, True)

Thanks in advance.
 
mu: I'm probably overlooking something here, or haven't seen, but I'm not familiar with a redirect statement that declares a string as an Integer (also, I would avoid, if possible, the use of the '#' character when possible). The FAQ on DataGrid hyperlink transfer of variables (faq855-4372) brings up the new page in the same browser, from my experience). Post the code for your complete Datagrid and lets take a look at it.
 
Isadore,
Thanks for the FAQ link. I realized my Hyperlink Column's < Target > was set to "Blank". I changed it to "Self" and it fixed the problem. You saved muy day.
Merci !!
 
Thanks, Isadore for that valuable link, man. It was just what I needed. I struggled with that stuff for over 2 days and after deciding to post I got the solution to my problem in 2 minutes !!

Mulema.
 
Mu & Merci - thanks for the compliments, but like you, I owe about 90% of what I know regarding dot NET to the big guns here - link9, Zarcom, LV, BoulderBum, Crazy, jzelhart and many others. Lots of experts drop by and I suppose they don't have time to come everyday, but Tek-Tips is a great place to air out problems.

One thing I am fast finding out though is that reading is instrumental -- get a few good book on VB.NET/ASP.NET and get into the 'concepts' of programming - use of DataSets, ADO, User controls, you name it, its all there. Glad I could be of help. Be academic, that's about the best advice I can give.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top