|
-
Jul 8th, 2014, 01:56 AM
#1
Thread Starter
Fanatic Member
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.
-
Jul 8th, 2014, 02:16 AM
#2
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jul 8th, 2014, 02:24 AM
#3
Thread Starter
Fanatic Member
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.
-
Jul 8th, 2014, 02:36 AM
#4
Re: WebForm and JQueryMobile
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|