I have created a datagrid with ID dgEncounter in form design, and add a
HyperLink Column, Link, which is bounded to a field URLs that providing the
URL of the page to go for each record. That is not enough, since I need to
add a KEY with ?= notation to follow the URL, for example, abc.aspx?key=xy z
where abc.aspx is a item value of URLs and xyz is a value of another column.
I Do not know how to do it. In the URL field in the property of
dgEncounter, URLs is filled in. So when I click a Link, it goes to the page
abc.apsx without key key=xyz.
The following is from the HTML source of Web browser for my code, Hope it is
useful. By the way, what does it mean by 'dgEncounter$_c tl3$_ctl0',
especially, $_ctl3$_ctl0:
<td><a href="javascrip t:__doPostBack( 'dgEncounter$_c tl3$_ctl0','')"
style="color:Bl ack;">Select</a></td><td><a href="PatientCh eckOut.aspx"
target="_blank" >Link</a></td><td>1</td><td>08 Jul 2005
11:32:35</td><td>Surgery
TBD</td><td>CheckOut </td><td>Administ ration</td><td>clinic</td><td>PatientC heckOut.aspx</td><td>3</td>
Thanks
David 4 4036
Hello David,
You probably want to look at the ItemDataBound event for the datagrid. Do
something along the following in that event:
if (e.Item.ItemTyp e == ListItemType.It em || e.Item.ItemType ==
ListItemType.Al ternatingItem)
{
// look for the hyperlink control and add key
HyperLink hl = (System.Web.UI. WebControls.Hyp erLink)
e.Item.FindCont rol("hlabc");
hl.NavigateUrl = "abc.aspx?k ey=" + myKey.ToString( );
}
A deeper explanation and sample can be found at http://www.codeproject.com/aspnet/ItemCreated.asp. Or do a search in google: http://www.google.com/search?hl=en&q=itemdatabound for more.
--
enjoy - brians http://www.limbertech.com
"david" wrote: I have created a datagrid with ID dgEncounter in form design, and add a HyperLink Column, Link, which is bounded to a field URLs that providing the URL of the page to go for each record. That is not enough, since I need to add a KEY with ?= notation to follow the URL, for example, abc.aspx?key=xy z where abc.aspx is a item value of URLs and xyz is a value of another column.
I Do not know how to do it. In the URL field in the property of dgEncounter, URLs is filled in. So when I click a Link, it goes to the page abc.apsx without key key=xyz.
The following is from the HTML source of Web browser for my code, Hope it is useful. By the way, what does it mean by 'dgEncounter$_c tl3$_ctl0', especially, $_ctl3$_ctl0: <td><a href="javascrip t:__doPostBack( 'dgEncounter$_c tl3$_ctl0','')" style="color:Bl ack;">Select</a></td><td><a href="PatientCh eckOut.aspx" target="_blank" >Link</a></td><td>1</td><td>08 Jul 2005 11:32:35</td><td>Surgery TBD</td><td>CheckOut </td><td>Administ ration</td><td>clinic</td><td>PatientC heckOut.aspx</td><td>3</td>
Thanks
David
Try:
<asp:HyperLinkC olumn
HeaderText="Lin k"
DataNavigateUrl Field="xyz_colu mn_name"
DataNavigateUrl FormatString="a bc.aspx?key={0} "
DataTextField=" Showing_column_ name"
/>
HTH
Elton Wang
"david" wrote: I have created a datagrid with ID dgEncounter in form design, and add a HyperLink Column, Link, which is bounded to a field URLs that providing the URL of the page to go for each record. That is not enough, since I need to add a KEY with ?= notation to follow the URL, for example, abc.aspx?key=xy z where abc.aspx is a item value of URLs and xyz is a value of another column.
I Do not know how to do it. In the URL field in the property of dgEncounter, URLs is filled in. So when I click a Link, it goes to the page abc.apsx without key key=xyz.
The following is from the HTML source of Web browser for my code, Hope it is useful. By the way, what does it mean by 'dgEncounter$_c tl3$_ctl0', especially, $_ctl3$_ctl0: <td><a href="javascrip t:__doPostBack( 'dgEncounter$_c tl3$_ctl0','')" style="color:Bl ack;">Select</a></td><td><a href="PatientCh eckOut.aspx" target="_blank" >Link</a></td><td>1</td><td>08 Jul 2005 11:32:35</td><td>Surgery TBD</td><td>CheckOut </td><td>Administ ration</td><td>clinic</td><td>PatientC heckOut.aspx</td><td>3</td>
Thanks
David
Thanks for both of you. However,
abc.aspx should be one of field values. That is asp file name such as
abc.aspx will be different for different record.
David
"Elton W" wrote: Try:
<asp:HyperLinkC olumn HeaderText="Lin k" DataNavigateUrl Field="xyz_colu mn_name" DataNavigateUrl FormatString="a bc.aspx?key={0} " DataTextField=" Showing_column_ name" />
HTH
Elton Wang
"david" wrote:
I have created a datagrid with ID dgEncounter in form design, and add a HyperLink Column, Link, which is bounded to a field URLs that providing the URL of the page to go for each record. That is not enough, since I need to add a KEY with ?= notation to follow the URL, for example, abc.aspx?key=xy z where abc.aspx is a item value of URLs and xyz is a value of another column.
I Do not know how to do it. In the URL field in the property of dgEncounter, URLs is filled in. So when I click a Link, it goes to the page abc.apsx without key key=xyz.
The following is from the HTML source of Web browser for my code, Hope it is useful. By the way, what does it mean by 'dgEncounter$_c tl3$_ctl0', especially, $_ctl3$_ctl0: <td><a href="javascrip t:__doPostBack( 'dgEncounter$_c tl3$_ctl0','')" style="color:Bl ack;">Select</a></td><td><a href="PatientCh eckOut.aspx" target="_blank" >Link</a></td><td>1</td><td>08 Jul 2005 11:32:35</td><td>Surgery TBD</td><td>CheckOut </td><td>Administ ration</td><td>clinic</td><td>PatientC heckOut.aspx</td><td>3</td>
Thanks
David
You can change the URL in ItemDataBound event.
HTH
Elton
"david" wrote: Thanks for both of you. However, abc.aspx should be one of field values. That is asp file name such as abc.aspx will be different for different record.
David
"Elton W" wrote:
Try:
<asp:HyperLinkC olumn HeaderText="Lin k" DataNavigateUrl Field="xyz_colu mn_name" DataNavigateUrl FormatString="a bc.aspx?key={0} " DataTextField=" Showing_column_ name" />
HTH
Elton Wang
"david" wrote:
I have created a datagrid with ID dgEncounter in form design, and add a HyperLink Column, Link, which is bounded to a field URLs that providing the URL of the page to go for each record. That is not enough, since I need to add a KEY with ?= notation to follow the URL, for example, abc.aspx?key=xy z where abc.aspx is a item value of URLs and xyz is a value of another column.
I Do not know how to do it. In the URL field in the property of dgEncounter, URLs is filled in. So when I click a Link, it goes to the page abc.apsx without key key=xyz.
The following is from the HTML source of Web browser for my code, Hope it is useful. By the way, what does it mean by 'dgEncounter$_c tl3$_ctl0', especially, $_ctl3$_ctl0: <td><a href="javascrip t:__doPostBack( 'dgEncounter$_c tl3$_ctl0','')" style="color:Bl ack;">Select</a></td><td><a href="PatientCh eckOut.aspx" target="_blank" >Link</a></td><td>1</td><td>08 Jul 2005 11:32:35</td><td>Surgery TBD</td><td>CheckOut </td><td>Administ ration</td><td>clinic</td><td>PatientC heckOut.aspx</td><td>3</td>
Thanks
David This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: patrick.mcdonald |
last post by:
Hello,
Example:
I have 100 rows that all have the field vaule of 'XYZ' I would like to
delete only 10 of those rows.
Is there such a query like "Delete 10 rows from table where table.field
= 'XYZ'"
|
by: Oberon |
last post by:
I want to create a collection of records which will be permanently
available at the application level in an ASP.NET application.
How should I go about that?
Lets say that the record structure has 4 fields with these types:
type field name
============
integer recordID
|
by: MrMike |
last post by:
Hi. I have the following Javascript function on an aspx page, in the HTML
code. As you can see, if the condition is true then 3 lines of code are
executed. My problem is that I cannot get the third line to work.
DataGrid1's style does not update as the Javascript specifies. Is this
formatted correctly? If not, please advise how I can correct this. Thanks!
function change()
{
if (xyz.style.display=="none")
{
|
by: CSL |
last post by:
I am using the DataGrid in a Windows Application, how can
I adjust the widths of each column individually.
|
by: Roy |
last post by:
Hey all,
On my html page I have a datagrid with the column:
<boundColumn datafield="xyz" visible = false>
</boundColumn>
In my code behind, within item data bound event, I dynamically set the
column text like so:
e.item.cells(10).text = mystring.trim
| |
by: Siegfried Heintze |
last post by:
I'm using a third party hosting service. I presently have a Web Service on
this hosting service's server that loads and executes a native mode DLL.
This demonstrates that the hosting service has given me proper access to the
temporary directory c:/Windows/Microsoft.NET/Framework/V1.1.4322/Temporary
ASP.NET Files/root/...."
I believe it also demonstrates that I have access to c:/documents and
settings/xyz/aspnet/local settings/
...
|
by: Kirk |
last post by:
I have a data grid in VB. I am trying to loop through all of the records and stop on the ones that are selected. What is the the syntax for this? Basically.
IF is selected the
Process recor
Els
Skip recor
End i
Any help would be appreciated. Thanks
|
by: Jose |
last post by:
How obtain the current record in the datagrid? The idea is doubleclick and
show another form with this current recor of my datagrid.
Thanks a lot
|
by: cody |
last post by:
class Test
{
IList list = new ArrayList();
MyCollection list2 = new MyCollection (list);
}
Leads to this error. I know I could initialize them in the ctor but I'm
asking myself where this restriction come from. Aren't the initializers
called in a well defined order or what is the problem here?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |