locked
single quotes and double quotes issue RRS feed

  • Question

  • HI All,

    i am having a trouble with below url

    <a href="ShowResume.aspx?cid=<%#DataBinder.Eval(Container.DataItem,"crmcontactid")%>&key=<%=value%>&spUrl=<%#DataBinder.Eval(Container.DataItem,"Path")%>&id=<%#DataBinder.Eval(Container.DataItem,"New_screeningId")%>"
                                     target="_blank" style="text-decoration: none">Resume</a>

    but in the url single quotes and double quotes are getting mixed up

    e.g

    below is the url which is mixing single and double quotes

    <a href="ShowResume.aspx?cid=77ccd056-810c-df11-911b-0019b9dc8028&amp;key=" java="" developer"&spurl="http://bonza:2222/NewCrmContacts/contact/Deng," zemian_77ccd056810cdf11911b0019b9dc8028="" 2015-07-08="" 04-42-13="" am="" 2010-01-29="" 02-56-17="" zemian="" deng.doc&id="
                                     target=" _blank"="" style="text-decoration: none">Resume</a>

    kindly help me for this issue

    Wednesday, July 15, 2015 4:58 AM

Answers

All replies

  • Please post ASP.NET related questions in the ASP.NET forums: http://forums.asp.net
    • Proposed as answer by Fouad Roumieh Wednesday, July 15, 2015 6:20 AM
    • Marked as answer by Just Karl Friday, September 11, 2015 8:09 PM
    Wednesday, July 15, 2015 5:02 AM
  • Can you use the browser to browser the link then copy and paste the url from the browser to your href code.

    chanmm


    chanmm

    • Proposed as answer by chanmmMVP Wednesday, July 15, 2015 10:23 AM
    Wednesday, July 15, 2015 10:23 AM
  • Try to put the DataBinder.Eval inside System.Web.HttpUtility.UrlEncode(YOUR_EVAL)

     

    Noam B.


    Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...

    Wednesday, July 15, 2015 1:17 PM
  • I n My Scenario i have used replace method on <%=value%>

    and the issue got resolved. 

    like below i have used the method

    <%=value.Replace("\"","")%>

    If anybody has gone through this issue, please use this sort of work.

    Monday, July 27, 2015 6:53 AM