473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Suggestions on how to Open a New Window from a data grid

I have a datagrid that holds a whole list of records about computers. I need one column that is a hyperlink that when clicked will show the details of that computer model. The hyper link needs to open in a new window and have an address that is my page name (modelinfo.aspx). That part is easy, as this is built into the datagrid control. But the last thing I need is a varible on it, so when the hyperlink is clicked, a New page would open and have an address "modelinfo.aspx?Model=" & what ever value is in the corresponding cell that was clicked. So if I clicked on Model "e20" the address bar would have to read "modelinfo.aspx?Model=e20" etc. Any suggestions? Thank

Bill
Nov 18 '05 #1
1 1161
try this in the datagrid..

<asp:HyperLink runat="server" Target=_blank Text='<%#
DataBinder.Eval(Container, "DataItem.Model") %>' NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.Model", "modelinfo.aspx?Model={0}")
%>'></asp:HyperLink>

Av.

"Bill" <an*******@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
I have a datagrid that holds a whole list of records about computers. I
need one column that is a hyperlink that when clicked will show the details
of that computer model. The hyper link needs to open in a new window and
have an address that is my page name (modelinfo.aspx). That part is easy,
as this is built into the datagrid control. But the last thing I need is a
varible on it, so when the hyperlink is clicked, a New page would open and
have an address "modelinfo.aspx?Model=" & what ever value is in the
corresponding cell that was clicked. So if I clicked on Model "e20" the
address bar would have to read "modelinfo.aspx?Model=e20" etc. Any
suggestions? Thanks

Bill

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tim Williams | last post by:
Hi. I'm starting to learn wxPython and for an exercise I'm writing a simple CSV file viewer. I just read in the CSV file and create a wx.Grid with the data. I'm using Python 2.3.2 with wxPython...
3
by: Scott | last post by:
Here is the scenario. I need to launch a popup using window.open, but can't pass everything i need to pass on the querystring. So I thought I would set a cookie. Basically I do: ...
2
by: Lajos Kuljo | last post by:
Hi, if I opened a php-page using ... onclick=\"help=window.open('help.php', 'Help', 'innerHeight=400,innerWidth=400,screenX=555,screenY=250,dependent=Yes,bar=Yes'); .... is there a way to...
4
by: KenG | last post by:
Hi: I have a datagrid that builds a hyperling which uses javascript to open a new window. The new window opens and displays fine, however, the original window that has the grid, is now blank...
1
by: Danny Ni | last post by:
Hi, I have a webform that will pop up window by clicking button or links inside data grid. Here are some sample code snippet: 'For button btnOrder.Attributes.Add("onclick",...
3
by: Arne Beruldsen | last post by:
On a web form I'm trying to populate a grid using data in an mdb database. I've used the controls to setup the connection string, adaptor, dataset. The grid appears to be seeing the data (column...
5
by: Brian P. Hammer | last post by:
I have data from multiple SQL tables, some of the tables will only have one row, while others multiple rows. I load a bunch of data from the various tables and add them to a third party grid. With...
7
by: matt | last post by:
hello, i have been given a challenging project at my org. i work on an inventory management web application -- keeping tracking of parts assigned to projects. in the past, i built an in-house...
1
by: Kurt Jakobsen | last post by:
Hi, I have problem opening an MySql connection from an win console application. I am using SharpDevelop as IDE. Previously I've been working with MySql through C# aspx and am new to writing exe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.