AJAX UPDATE PANEL NOT WORKING.. [Resolved]

Posted by Neer under ASP.NET AJAX on 2/24/2012 | Points: 10 | Views : 9384 | Status : [Member] | Replies : 8
hi all,

i want to achieve that when i changes to the sub pages the master page should not always refresh..

i tried using ajax update panel.. but its not resulting. its still updating whole page include master page.

do i need to set any property for this to work

-Neer


Responses

Posted by: Ppathi on: 2/24/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi,

Try this

Master Page u have to add like this

below the form tag
-------------------------------
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

Child page u have use like this

<asp:UpdatePanel ID="Up_GQ_Cont" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<!-- YOUR CONTENT HERE -- >
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="Up_GQ_Cont">
<ProgressTemplate>
<div style="position:absolute;left:650px;top:600px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
<img src="/images/loading.gif" alt="" />
</td>
</tr>
</table>
</div>
</ProgressTemplate>
</asp:UpdateProgress>





Thanks & Regards,
Pasupathi G
No Pain No Gain

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>


<div id="bg" z-index="2">

<div id="main">
<div id="maintop"></div>
<!-- header begins -->
<div id="header">

<div id="buttons">
<ul>
<li class="first"><a href="Default.aspx">Home</a></li>
<li><a href="Photogallery.aspx">Photo Gallery</a></li>
<li><a href="Gallery.aspx">Amenities</a></li>
<li><a href="Attraction.aspx">Area Information</a></li>
<li><a href="http://www.daysinn.com/DaysInn/control/Booking/modify_dates?brandCode=DI&searchWithinMiles=25&areaType=1&destination=Auburn&stateName=New%20York&state=NY&countryName=United%20States&country=US&checkInDate=&numberAdults=1&numberRooms=1&checkOutDate=&numberChildren=0&rateName=Best%20Avail&rate=000&id=07577&propBrandId=DI&" target="_blank">Reservation</a></li>
<li><a href="ContactUs.aspx">Contact</a></li>
</ul>
</div>
<div id="logo">

<div id="logomain">
<div id="abcleft">
<div style='width: 120px; height: 60px; background-image: url( http://vortex.accuweather.com/adcbin/netweather_v2/backgrounds/clouds_120x60_bg.jpg ); background-repeat: no-repeat; background-color: #;' ><div id='NetweatherContainer' style='height: 48px;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp?partner=netweather&tStyle=normal&logo=0&zipcode=36830&lang=eng&size=7&theme=clouds&metric=0&target=_self'></script></div><div style='text-align: center; font-family: arial, helvetica, verdana, sans-serif; font-size: 10px; line-height: 12px; color: #;' ><a style='color: #' href='http://www.accuweather.com/us/al/auburn/36830/city-weather-forecast.asp?partner=netweather' >Weather Forecast</a></div></div>
</div>
<div id="logomainup">
<div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/DaysinnLogo.gif"
Width="175px" Height="87px"/>

<br /><font color="green" size="0.5"><b><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The Best Value Under The Sun</em></b></font><small>

</div>

</div>
<div class="style2">
<b style="color: rgb(0, 0, 0); font-family: 'Times New Roman', serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">
<span class="style3"
style="font-size: 22pt; font-family: 'Academy Engraved LET';">Days Inn
Auburn / Finger Lakes Region</span></b></div>
</div>

</div>

</div>
<!-- header ends -->
<!-- content begins -->
<div id="content">
<div id="left">
<div class="text">
<%--<h1>Welcome to Our Website!</h1>--%>
<div>

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>

</div>
</div>

</div>
</div>

</div>

</div>

</form>


-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pradeepkumar417 on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Add this code in your page load event

 using AjaxControlToolkit;


// place this code in page load event
ToolkitScriptManager objScriptManager = (ToolkitScriptManager)this.Master.FindControl("ScriptManager1");
objScriptManager.AsyncPostBackTimeout = 36000;


I hope it will help

Thanks & Regards,
Software Engineer,
Pradeep Kumar

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hello Sir, Its Giving me the below Error

Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.

-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
ANy ONe HAve ANy SoLuTion?

-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Ok thanks ,

I was Applying this Updatepanel and content template on content place holder of mster page only..

Let me try urs suggestion first.

-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neer on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Not Working ..


-Neer

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ppathi on: 2/24/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

ok could you please attach your code



Thanks & Regards,
Pasupathi G
No Pain No Gain

Neer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response