Go Back   TechArena Community > Technology > Technology & Internet
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Single quote precision parameter consider as String

Technology & Internet


Reply
 
Thread Tools Search this Thread
  #1  
Old 24-04-2009
Member
 
Join Date: Apr 2009
Posts: 55
Single quote precision parameter consider as String
  

Hello friends,
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

Reply With Quote
  #2  
Old 24-04-2009
Member
 
Join Date: Oct 2008
Posts: 167
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") + "&amp;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.
Reply With Quote
  #3  
Old 24-04-2009
Member
 
Join Date: Dec 2008
Posts: 183
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.
Reply With Quote
  #4  
Old 24-04-2009
Member
 
Join Date: Feb 2006
Posts: 185
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.
Reply With Quote
Reply

  TechArena Community > Technology > Technology & Internet
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 11:37 PM.