Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<script type="text/javascript">

    function openEditorWindow(forumID) {
        var oReadingWnd = radopen("~/AddArchives.aspx?id=" + forumID);
        oReadingWnd.Center();
    }
</script>
<script type="text/javascript">
    function GetTextBoxValue() {

        var hyp = document.getElementById('<%= JournalName.ClientID %>');

        var hyp1 = document.getElementById('<%= hplAddAcrhives.ClientID %>');
        //alert(hyp.innerHTML + 'su' + hyp.innerText);
        hyp.innerHTML = 'New Text';
        //alert(hyp.innerHTML);
        hyp1.href = 'AddArchives.aspx?JournalName=' + (hyp.value);
    }



and hyperlink -

XML
<asp:HyperLink ID="hplAddAcrhives"  BackColor="WhiteSmoke"
                                            Font-Bold="True" CssClass="fancybox iframe" runat="server" onClick= "javascript:GetTextBoxValue();">Add Archives</asp:HyperLink>

example - suppose if i pass JOURNAL & RESEARCH from query string ... than text box fetch only JOURNAL

Plz help me .. How to solve this problem
Posted

You need to encode your querystring. An ampersand & in the querystring means it is a new parameter.

In C# you can use Sever.UrlEncode to Encode the querystring. Then in JS you use decodeURIComponent() to decode it.
 
Share this answer
 
Use this for URL Encode by javascript and pass to url
------------------------------------------------------

encodeURIComponent(strURL);


Use this for Decode URL code to Page which u want move
-------------------------------------------------------

HttpUtility.UrlDecode(url)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900