I have tried looking through this site and Google’d many options, there are various ideas about saving the state of the UpdatePanel before the post-back, however I am unsure how to implement such a thing.
I have a UpdatePanel within a ASP.NET Page which refreshes a GridView – my code works well. However on the Async Post-back it causes the JQuery CSS to disappear which makes the text boxes look rounded, colour of text etc…
I do not need to add any JQuery events – however just need to know how to add the styling back into the Panel – adding the whole framework back in could also be an option.
I would add the code to my project but its massive – below are my JQuery references on my Site Master:
<!DOCTYPE html>
<html class="ui-mobile">
<head>
<!-- Apple Settings -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Apple Icons -->
<link rel="apple-touch-icon" href="/touch-icon-iphone.png"/>
<link rel="apple-touch-icon" href="/touch-icon-iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/touch-icon-ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/touch-icon-iphone-retina.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/touch-icon-ipad-retina.png" />
<link rel="icon" href="/touch-icon-ipad-retina.png" />
<!-- Style Sheets -->
<link rel="stylesheet" href="/themes/Sequencing_App_V2.min.css" />
<link rel="stylesheet" href="/css/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="/css/Custom.css" />
<!-- JavaScript -->
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/javascript/Custom.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript" src="/js/jquery.mobile-1.2.0.min.js"></script>
<!-- Content Placeholders -->
<title><asp:ContentPlaceHolder ID="page_title" runat="server"></asp:ContentPlaceHolder></title>
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
Can anyone help here?
I appreciate all the help you can offer.
Steve
jQuery mobile adds a lot of extra html elements when you construct it.
These will be lost after a PostBack, and you need to recreate it for the new elements in your UpdatePanel.
If you are using a listview to present your data, you will need to refresh it after the PostBack