473,545 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please help with DataNavigateUrl FormatString property issue with the DataGrid

Hi,

I've been using the DataGrid control in my ASP.NET web page. The page is
used to search for records in the database. The control is bound to a
DataSource and gets populated ok. I am also using a Hyperlink column in
the grid to allow the user to redirect to another page, again that works
fine.

My problem is when I want to call the ASP.NET search page from more than
one page because I cannot find a way to programatically set the
"DataNavigateUr lFormatString" property of the HyperLink control. I need
to do this to allow the page to navigate to different pages depending on
which page called this page.

Any help would be appreciated, I've added the code from my control below
but would like to be able to set the DataNavigationU rlFormatString
property to something like

DataNavigateUrl FormatString="< %=MyString%>"

instead of
PublicFunder.as px?FunderID={0}

But this does not seem to work.

Thanks in advance
Rob

<asp:datagrid id="grdSearchRe sults" tabIndex="6" runat="server"
CssClass="Grid" Width="457px"
Visible="False" AutoGenerateCol umns="False">
<AlternatingIte mStyle CssClass="GridA lternatingRow
"></AlternatingItem Style>
<HeaderStyle CssClass="GridH eader"></HeaderStyle>
<Columns>
<asp:HyperLinkC olumn Text="Choose" DataNavigateUrl Field="FunderID "
DataNavigateUrl FormatString="P ublicFunder.asp x?FunderID={0}" ></asp:Hyper
LinkColumn>
<asp:BoundColum n DataField="Fund erId" ReadOnly="True"
HeaderText="Fun der Id"></asp:BoundColumn >
<asp:BoundColum n DataField="Fund erName" ReadOnly="True"
HeaderText="Nam e"></asp:BoundColumn >
</Columns>
</asp:datagrid>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
0 1672

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

Similar topics

0
4833
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME" DataNavigateUrlFormatString="http://www.aaa.com?Name={0}" SortExpression="NAME" />
1
1347
by: Tim Smith | last post by:
In my .cs code I populate set the DataSource appropriately and I can get my DataGrid to appear, though sorting throws an error 'dgDataGrid1__ctl1__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag But ignoring that, with my asp:DataGrid how can I have a column of values each with a link e.g. <a href="Details.aspx?id=" +...
0
1426
by: | last post by:
How in ASP.Net does one alter Current DataGrid Coding Below to create a URL that allows for multiple parameters? I need to Post Multiple URL Paramaters via a Single URL for example : test.aspx?test=1&Next=2 Where: test= Databind Result Next= Paramater Passed from QueryString or Other Variable
0
1215
by: CodeMotion | last post by:
Hi all, I am familiar with setting the DataNavigateUrlFormatString property of a hyperlink column to a bound column. However, I also want to append the querystring of the page that the datagrid lives on. Example: The datagrid is on this page: http://somedomain.com/someweb/domain.aspx?csid=3 I am filling the datagrid with some other...
0
257
by: RobT | last post by:
Hi, I've been using the DataGrid control in my ASP.NET web page. The page is used to search for records in the database. The control is bound to a DataSource and gets populated ok. I am also using a Hyperlink column in the grid to allow the user to redirect to another page, again that works fine. My problem is when I want to call the...
2
2424
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just fine. However, when attempting to assing default values as designtime in the propertygrid, nothing is working on the class object. I know that I...
2
1907
by: momo | last post by:
Hello Guys, I have a bit of a problem, I created a Dll called SecureQueryStringDll.dll and I had the dll put bin folder of my application first and it did not work so I then put it in the bin folder of c:\inetpub\wwwroot and it still does not work. Here is the error I get from it: temporary asp.net...
0
991
by: CK | last post by:
Hi All, I have a gridview that contains a column that has a repeater inside it. My intent is to put every comment for an album into the repeater in the comments column. I am using a SQLDataSource with a control parameter. The parameter value is the outer gridview selected value. This of course onlys gets the comments for the selected row....
3
1537
by: settyv | last post by:
Hi, I need to generate PDF stream when i click on Linkbutton in datagrid ..At present i hardcoded the DMS Id and now it is working.But i need to pass DMS ID when click linkbutton.How can i do that? Here is the ASPX code: <asp:datagrid id="grdTentativeResults" Width="800" Runat="server"
0
7425
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...
0
7682
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. ...
0
7935
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...
1
5351
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...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3479
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...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1911
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
0
734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.