I'm not listening to pagebeforechange as of now. How to work with that?
Here is my code (Not sure I'm going in right direction either.) Before you ask me why I'm calling codebehind methods, its because by using webmethod I'm not able to call controls within my search method (I'm trying to move to mobile web app from a working web app page)
<asp:Content ID="HeadContent" runat="server" ContentPlaceHolderID="Head2">
<link href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script language=javascript>
$(document).bind("mobileinit", function () {
$.mobile.ajaxLinksEnabled = false;
$.mobile.defaultTransition = 'flip';
$.mobile.ajaxEnabled = false;
});
</script>
<script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<script type="text/javascript">
function onClickSearchButton() {
location.href = "#searchresults";
}
</script>
</asp:Content>
<asp:Content ID="MiddleContent" runat="server" ContentPlaceHolderID="Body2">
<div data-role="page" id="searchtools">
<div data-role="content">
<div data-role="header">
<h1>Search Page</h1>
</div>
// Textbox, DDL, Radio buttons etc.,
<div class="ui-grid-a">
<div class="ui-block-a"><a href ="#" id="clrFilters" runat="server" onserverclick="clrFilters_Click" data-role="button" data-theme="e">Clear Search</a></div>
<div class="ui-block-b"><a href="#" id="btnSearch" runat="server" onclick="onClickSearchButton()" onserverclick="SearchList_Click" data-role="button" data-theme="b" data-transition="flip" >Search</a></div>
</div>
</div></div>
<div data-role="page" data-url="searchresults" id="searchresults">
<div data-role="content">
<div data-role="header">
<h3>Search Results</h3>
</div>
<asp:UpdatePanel ID="SearchResultsPanel" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSearch" />
</Triggers>
<ContentTemplate>
<div class ="detailedListingList">
<asp:ListView ID="MyListView" runat="server" OnItemDataBound="ListView_ItemDataBound" DataKeyNames="ID" >
<LayoutTemplate>
<ul data-role="listview" data-theme="d" data-inset="true">
<li runat="server" id="itemPlaceholder" />
</ul>
</LayoutTemplate>
<ItemTemplate>
<li id="ListingListItem" runat="server">
<span><asp:HyperLink ID="ListingLink" runat="server" NavigateUrl='<%# ListingUrl(Eval("Name").ToString(), Convert.ToInt32(Eval("ID").ToString())) %>' Text='<%# Eval("Name") %>' rel="external" data-ajax="false" data-role="button" data-transition="pop" data-theme="b" /></span></h6></div>
</ItemTemplate>
</ContentTemplate>
</asp:UpdatePanel>
</div></div>
</asp:Content>
Please throw some light here.. Thanks again!!