473,803 Members | 3,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

build a personalized link on a datagrid

I want a row of the datagrid with a personalized link. The fields of the
link are on the select related to the datagrid
the link would be accoiones.aspx? iddireccion=2&i dindicador=5

I tried this but doesnt work
<ItemTemplate >

<asp:HyperLin k runat="server" id="Hyperlink2 "
NavigateUrl='ac ciones.aspx?idd ireccion='<%#
DataBinder.Eval (Container,"Dat aItem.iddirecci on"%>'&idindica dor='<%#
DataBinder.Eval (Container,"Dat aItem.idindicad or"%>'>link</asp:HyperLink>
</ItemTemplate>
Nov 18 '05 #1
2 1537
Hello,

I use:

<asp:HyperLinkC olumn Text="delete"
DataNavigateUrl Field="Hardware AssetCFId"
DataNavigateUrl FormatString="S tandardFields.a spx?delete={0}" >
<HeaderStyle HorizontalAlign ="Left"
CssClass="gridH eader"></HeaderStyle>
<ItemStyle CssClass="gridF irstItem"></ItemStyle>
</asp:HyperLinkCo lumn>

The property Text will be displayed for every row, and the
DataNavigateUrl Field, DataNavigateUrl FormatString together let you create
the link,

Greets,
Gab

"Luis E Valencia" <lu*******@hace b.com> schreef in bericht
news:eD******** ******@TK2MSFTN GP12.phx.gbl...
I want a row of the datagrid with a personalized link. The fields of the
link are on the select related to the datagrid
the link would be accoiones.aspx? iddireccion=2&i dindicador=5

I tried this but doesnt work
<ItemTemplate >

<asp:HyperLin k runat="server" id="Hyperlink2 "
NavigateUrl='ac ciones.aspx?idd ireccion='<%#
DataBinder.Eval (Container,"Dat aItem.iddirecci on"%>'&idindica dor='<%#
DataBinder.Eval (Container,"Dat aItem.idindicad or"%>'>link</asp:HyperLink>
</ItemTemplate>

Nov 18 '05 #2
I didnt understand.

This is the code that fills that datagrid

Public Sub pasar(ByVal sender As System.Object, ByVal e As
System.Web.UI.W ebControls.Data GridCommandEven tArgs)

If IsPostBack Then

Dim iddireccion As Int16 = dgdir.DataKeys( e.Item.ItemInde x)

'lblmetas.Text = "Indicadore s para la direccion seleccionada"

Dim selectCMD2 As SqlCommand = New SqlCommand("sel ect * from tblrelinddir,
tblheaderindica dor where
tblheaderindica dor.idindicador =tblrelinddir.i dindicador and
tblrelinddir.id direccion=" & iddireccion & "", SqlConnection1)

selectCMD2.Comm andTimeout = 30

Dim custDA2 As SqlDataAdapter = New SqlDataAdapter

custDA2.SelectC ommand = selectCMD2

Dim custDS2 As DataSet = New DataSet

custDA2.Fill(cu stDS2, "tblindicadorme ta")

dgmetas.DataSou rce = custDS2.Tables( "tblindicadorme ta").DefaultVie w

If custDS2.Tables( "tblindicadorme ta").Rows.Cou nt = 0 Then

' lblmetas.Text = "NO hay indicadores en esta direccion"

dgmetas.Visible = False

' panelmeta.Visib le = False

Else

dgmetas.DataBin d()

dgmetas.Visible = True

'panelmeta.Visi ble = False

End If

End If

End Sub

and I need two fields on the link that are on the table called RELINDDIR a
fiels is called idireccion and the other is idindicador

and I want the link to show acciones.aspx?i dindicador=2&id direccion=4

can u help me a little more?

"Gabriël" <sp**@adiso.n l> escribió en el mensaje
news:10******** *****@corp.supe rnews.com...
Hello,

I use:

<asp:HyperLinkC olumn Text="delete"
DataNavigateUrl Field="Hardware AssetCFId"
DataNavigateUrl FormatString="S tandardFields.a spx?delete={0}" >
<HeaderStyle HorizontalAlign ="Left"
CssClass="gridH eader"></HeaderStyle>
<ItemStyle CssClass="gridF irstItem"></ItemStyle>
</asp:HyperLinkCo lumn>

The property Text will be displayed for every row, and the
DataNavigateUrl Field, DataNavigateUrl FormatString together let you create
the link,

Greets,
Gab

"Luis E Valencia" <lu*******@hace b.com> schreef in bericht
news:eD******** ******@TK2MSFTN GP12.phx.gbl...
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid
the link would be accoiones.aspx? iddireccion=2&i dindicador=5

I tried this but doesnt work
<ItemTemplate >

<asp:HyperLin k runat="server" id="Hyperlink2 "
NavigateUrl='ac ciones.aspx?idd ireccion='<%#
DataBinder.Eval (Container,"Dat aItem.iddirecci on"%>'&idindica dor='<%#
DataBinder.Eval (Container,"Dat aItem.idindicad or"%>'>link</asp:HyperLink>
</ItemTemplate>


Nov 18 '05 #3

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

Similar topics

2
1779
by: Tyler Lyon | last post by:
I am trying to find a free script that allows a user to register and login to their own personalized page that was automatically created when the user registered. I am creating a website where the users can access their personal page by logging in and on that page they can find correspondence and their history with me, etc. Can you please help me with finding a free script that does all of this? Thanks in advance, Tyler
10
2355
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the ListBox is edited I came up with this code.) This code works but of course it gives me build...
4
1888
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then copy the URL to his own web page, that I might be penalized because my page would include that text on the resulting page. For example, let's say that "GOD LOVES JOKES" has negative connotations. Someone could create:
0
1186
by: Luis E Valencia | last post by:
Read from above to top. I didnt understand. This is the code that fills that datagrid Public Sub pasar(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)
2
2381
by: JenHu | last post by:
hi, I have a datagrid in my asp.net application, I am using vb.net language. I want to have my last column as a link column, link to text file. The link path is "c:\Temp\" & F_File_Name, which is the 2nd column. For example, the data grid should like this:
7
3347
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid, theres a requirement to show a drop down menu list (this is a control I downloaded online) in one of the columns. For the purposes of this question, Ive implemented the drop down menu as a drop down list instead. Ive got all this working at this...
4
5055
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup, websites, MSDN and was not able to find something that would help me understand and code. I might not be searching for the right words or phrases. So if you know how to do this or know of links or websites that have information about this, please...
1
1574
by: Michael | last post by:
Hello, Does anyone know how to create a personalized url? For example, I would like my site http://www.mysite.com to offer it's users the ablity to create personalized urls like http://myname.mysite.com Does anyone know how I can do that via code? So it will be automated when the user creates an account. Thanks.
3
1361
by: Pam1234 | last post by:
Hi everyone, This is a broad question but I'm hoping someone can steer me in the right direction. I can write valid xhtml strict in the dark with my eyes shut but I'm a trial-and-error person when it comes to PHP. For that reason I'll require concrete examples if possible. I've installed and modified plenty of Joomla sites, I can wade through existing PHP code with some degree of success, and I do know how to set up a database in MySQL at...
0
9566
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,...
0
10555
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, 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...
0
10317
jinu1996
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...
1
10300
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,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7607
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 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...
0
5503
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...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.