You must Sign In to post a response.
  • Category: JQuery

    How to pass vaues using jquery


    I want to pass a value to another page and display value there and load that page using jquery

    i tried following code

    $('#addr').click(function (e) {
    var url = "AddressForm.aspx?stid=" + encodeURIComponent($("#txtstid").val()) + "&clas=" + encodeURIComponent($("#txtclass").val());
    // window.location.href = url;

    here i want to display AddressForm.aspx in displ div. and passing 2 texbox values.

    i wrote the code for displaying in AddressForm.aspx


    var queryString = new Array();
    if (queryString.length == 0) {
    if ('?').length > 1) {
    var params ='?')[1].split('&');
    for (var i = 0; i < params.length; i++) {
    var key = params[i].split('=')[0];
    var value = decodeURIComponent(params[i].split('=')[1]);
    queryString[key] = value;


    current problem is Addressform.aspx is displaying but no data is displaying in corresponding textboxes.

    How to solve this


  • #763232
    Hi baiju,

    I suggested you to check whether values are getting in page2 via browser in console, if values are getting may be problem with display in page2, if values not getting problem with passing parameters in page1. Refer below link, here he is explains how to pass query sting using jquery with simple example"".

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • Sign In to post your comments