Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:16:44+00:00 2026-06-12T16:16:44+00:00

Here is my problem.. I am working jquery and mvc2. I selected or writing

  • 0

Here is my problem..

I am working jquery and mvc2. I selected or writing the values in input controls like check box or text box or drop downs, then i moved to next page, then i get back to same page i need the check box to be checked or the text box having values..how can i do it

maintain the input control values between pages
Thank you in advance

    #region TableHeaderOnStart
    public string TableHeaderOnStart()
    {
        string TableHeaderValues = string.Empty;
        try
        {
        TableHeaderValues = TheadShipTo + "," + TheadCountry + "," + TheadNotes + "," + TheadShipStatus + "," + TheadStoreName + "," + TheadRSM;
        }
        catch (Exception ex)
        {
            TableHeaderValues = string.Empty;
            Logger.WriteToLog(Logger.LogType.Error, Constant.strmerchantname, Constant.struser, "OrderController.TableHeaderValues()", ex.Message, null, null);
        }
        return TableHeaderValues;
    }
    #endregion

    #region TableHeaders
    public void TableHeaders(bool ShipTo, bool Country, bool Notes, bool ShipStatus, bool StoreName, bool RSM)
    {
        TheadShipTo = ShipTo;
        TheadCountry = Country;
        TheadNotes = Notes;
        TheadShipStatus = ShipStatus;
        TheadStoreName = StoreName;
        TheadRSM = RSM;
    }
    #endregion

The above Code in parent View’s Contoller page…
Below code is for Parent view.. in jquery….almost i got it….

     jQuery(document).ready(function ($) {
        $('#thetable1').tableScroll({ height: 100 });
        $('#table').tableScroll({ height: 100 });
        $('#thetable3').tableScroll({ height: 100 });


        var Url = '<%: Url.Action("TableHeaderOnStart", "Orders") %>';
        $.ajax({
            cache: false,
            type: "POST",
            url: Url,
            data: "",
            dataType: "HTML",
            success: function (data) {

                var Header = data.split(',');

                if (Header[0] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Ship To')").show();
                        jQuery("#jqTable").showCol("Ship To")
                    });
                    $('#SHIPTO').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Ship To')").hide();
                        jQuery("#jqTable").hideCol("Ship To")
                    });
                    $('#SHIPTO').attr('checked', false);
                }

                if (Header[1] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Country')").show();
                        jQuery("#jqTable").showCol("Country")
                    });
                    $('#COUNTRY').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Country')").hide();
                        jQuery("#jqTable").hideCol("Country")
                    });
                    $('#COUNTRY').attr('checked', false);
                }

                if (Header[2] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Notes')").show();
                        jQuery("#jqTable").showCol("Notes")
                    });
                    $('#NOTES').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Notes')").hide();
                        jQuery("#jqTable").hideCol("Notes")
                    });
                    $('#NOTES').attr('checked', false);
                }

                if (Header[3] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Ship Status')").show();
                        jQuery("#jqTable").showCol("Ship Status")
                    });
                    $('#SHIPSTATUS').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Ship Status')").hide();
                        jQuery("#jqTable").hideCol("Ship Status")
                    });
                    $('#SHIPSTATUS').attr('checked', false);
                }

                if (Header[4] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Store Name')").show();
                        jQuery("#jqTable").showCol("Store Name")
                    });
                    $('#STORENAME').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('Store Name')").hide();
                        jQuery("#jqTable").hideCol("Store Name")
                    });
                    $('#STORENAME').attr('checked', false);
                }

                if (Header[5] == 'True') {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('RequestedShipMethod')").show();
                        jQuery("#jqTable").showCol("RequestedShipMethod")
                    });
                    $('#RSM').attr('checked', true);
                }
                else {
                    $('#jqTable tr').each(function () {
                        $(this).find("td:contains('RequestedShipMethod')").hide();
                        jQuery("#jqTable").hideCol("RequestedShipMethod")
                    });
                    $('#RSM').attr('checked', false);
                }

            },
            error: function (xhr, ajaxOptions, thrownError) {
                if (xhr.status == 403) {
                    window.location.href = '<%: Url.Action( "SessionExpire", "Home" ) %>';
                }
            }
        });

        //window.onbeforeunload = function () {
        $(window).unload(function () {
            var SHIPTO = document.getElementById('SHIPTO').checked;
            var COUNTRY = document.getElementById('COUNTRY').checked;
            var NOTES = document.getElementById('NOTES').checked;
            var SHIPSTATUS = document.getElementById('SHIPSTATUS').checked;
            var STORENAME = document.getElementById('STORENAME').checked;
            var RSM = document.getElementById('RSM').checked;

            var Url = '<%: Url.Action("TableHeaders", "Orders") %>';
            $.ajax({
                cache: false,
                type: "POST",
                url: Url,
                data: "ShipTo=" + SHIPTO + "&Country=" + COUNTRY + "&Notes=" + NOTES + "&ShipStatus=" + SHIPSTATUS + "&StoreName=" + STORENAME + "&RSM=" + RSM,
                dataType: "HTML",
                success: function (data) {
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    if (xhr.status == 403) {
                        window.location.href = '<%: Url.Action( "SessionExpire", "Home" ) %>';
                    }
                }
            });
            return false;
        });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:16:45+00:00Added an answer on June 12, 2026 at 4:16 pm

    I guess that when you click on ” Next ” link on your already rendered view , you are calling an another Action Method where you render your Next View . You should be posting your Values from your parent view to Next View , store your values of Textboxes, checkboxes in a Session Variable in your Parent View’s Controller action Method and then pass the control to the Next View’s action method … Render that …

    When you again call a Back Link,button on this view ..Call your Parent View’s controller action Method which will render your Parent View with already present values of textboxes , checkboxes as earlier you have stored them in Session variables…

    If you can provide some code then it would be easy to help you out more

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jQuery for some reason isn't working.I'd like to know what the problem is.Here is
So here's my problem. I'm currently working on a PhoneGap application using jQuery Mobile
I am working in jquery and javascript.Here is my problem. I have want to
Odd problem here. Working with an existing system that uses TinyMCE as it's text
I am working on jquery ui dialog box to display multiple images. Here is
I have a working simple jquery drop-down menu . But problem is how can
I have a homework problem here I've been working on; here is the description:
Here's a tricky iPhone problem I've been working on. I have three UIScrollViews on
Problem: to get the command working here. My domain is http://cs.edu.com/user/share_dir , but I
I'm working on a simple subtraction problem, but unfortunately it keeps returning NaN Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.