|
| ||||||||||
| Tags: double quote precision, navigate url, single quote |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Single quote precision parameter consider as String
I want to navigate my URL but there is problem with the single quote and double quote URL. <asp:hyperlink navigateURL='file.aspx?id=<%=session("id")%>' runat=server>Link Text</asp:hyperlink> in the above URL parameter i want to pass parameter in the single quote and this is because the Double quoted text does not work properly as it is problem in the .NET, but the problem is that the parameters mentioned in the single quoted parameter considers as String and that does not deliver the appropriate goal. Thanks |
|
#2
| |||
| |||
| Re: Single quote precision parameter consider as String
I use hyperlink column fine with embedded quotes with csharp like so: <asp:HyperLink id=HyperLink1 runat="server" Font-Size="Smaller" ForeColor="#0000CC" Font-Names="verdana" NavigateUrl='<%# "?categoryid=" + DataBinder.Eval(Container.DataItem,"report_category_id") + "&office=" + Request.QueryString["office"] %>'> <%# DataBinder.Eval(Container.DataItem,"report_category_name") %> </asp:HyperLink> So, change the plus signs to ampersands (and the pound sign out?) if you're using VB. |
|
#3
| |||
| |||
| Re: Single quote precision parameter consider as String
I dont think you need an '=' again in <%=session("id")%>. also you can put a break point always and check if the value is there for id.set the navigate url parameter in your codebehind. Code islands should be avoided if at all possible. |
|
#4
| ||||
| ||||
| Re: Single quote precision parameter consider as String
Generally the proper way of setting things like that is in the code behind.However, if for whatever reason you want to do it this way, it would look more like: NavigateUrl="~/test2.aspx?ID=<%# Bind("Id") %>" inside the element that you are setting that attribute on. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Single quote precision parameter consider as String" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help to get single quote in every cell of Excel | Hache hi | MS Office Support | 2 | 23-02-2012 12:17 PM |
| How to get rid of single quote in Microsoft Excel sheet | Wisaal | MS Office Support | 2 | 10-02-2012 04:22 PM |
| Firefox 8 is breaking webforum “Quote” function. | JoJoRun | Technology & Internet | 8 | 03-12-2011 02:26 PM |
| Is it possible to upgrade single dual core to two dual core in Dell Precision 6900 | mewlyo | Motherboard Processor & RAM | 4 | 22-01-2011 06:22 PM |
| Quote Estimate Form for Web Development | Brendan18 | Software Development | 3 | 30-06-2009 11:14 PM |