VS 2012 WebForm and JQueryMobile-VBForums
Results 1 to 4 of 4

Thread: WebForm and JQueryMobile

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    WebForm and JQueryMobile

    I have this Default page with multiple data-role, the structure is

    Code:
    <div data-role="page">
    <a href="#login"></a>...
    </div>
    <div data-role="page" id="login">
    <!-- Form elements here -->
    </div>
    When login event is clicked, the code is something like this

    Code:
    if (ok) {
    Response.Redirect("Dashboard.aspx");
    } else {
    // Something goes wrong and display message
    Response.Redirect("Default.aspx#login", true);
    }
    I expected it to redirect to the page with data-role login. But instead it goes to Default.aspx. Anyone tried this? I need it to redirect to #login page. Thanks a lot.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,013

    Re: WebForm and JQueryMobile

    I have to say that i haven't used data-role a lot.Having said that i don't really think that response.Redirect gives squat about your intention. Since it's a server side function it will redirect at page level, meaning it will not even try to parse any client html div's.
    Now to be clear, are you saying you expect it to redirect to a specific page or a specific SECTION of a page?
    For the later you may be better of by using Javascript. I think there are a lot of examples in the internet showing how to scroll to a specific div with a specific id.
    Slow as hell.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: WebForm and JQueryMobile

    Oh I said it "page" because of the data-role="page" of the JQueryMobile. Yes, it's actually a section of a page. I wonder if I can redirect it to a page with reference because when I do a Default.aspx#login in the address bar it goes to the login. The thing about jQueryMobile is the data-role page acts something like a page and by going, let's say #login it displays the data-role="page" section alone.

    Thanks, I'll try checking some javascript. If I can just do it with some redirect in ASPX that would be lovely as it's not a bulk of coding but anyways I try dealing it with javascript.

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,013

    Re: WebForm and JQueryMobile

    I don't think it will be hard.
    To give you an idea:
    http://stackoverflow.com/questions/6...oll-to-element
    Slow as hell.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.