Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

Wednesday, March 28, 2012

PostBack is happening even after using Update Panel and Script Manager

Hi,

I have a ASP.NET web application. I have a gridview and using a RowDataBound andRaisePostBackEventevent for getting the GridView details in the controls below like textboxes, dropdown etc. Now i am using Ajax Extensions controls like Update Panel and Script manager to avoid a postback happening when the GridView row is clicked. Even after implementing them postback is happening. Please see the code bits and let me know if i am missing somewhere.

UI

<asp

:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true"></asp:ScriptManager>

<

asp:UpdatePanelid="UpdatePanel1"runat="server"UpdateMode="Conditional">

<contenttemplate>

<asp:GridViewID="GridView1"runat="server"OnRowDataBound="GridView1_RowDataBound"CssClass="sampletable"AlternatingRowStyle-CssClass="d1"ShowHeader="true"ShowFooter="false"AllowPaging="true"AllowSorting="true"AutoGenerateColumns="false"DataKeyNames="ProjectID"Width="100%"PageSize="5"><Columns>

<asp:BoundFieldVisible="false"HeaderText="Project ID"DataField="ProjectID"SortExpression="ProjectID"/><asp:BoundFieldHeaderText="Project Name"DataField="ProjectName"SortExpression="ProjectName"/><asp:BoundFieldHeaderText="Site Name"DataField="SiteName"SortExpression="SiteName"/></Columns></asp:GridView><asp:LabelID="Label1"runat="server"Text="Label"></asp:Label><asp:TextBoxID="TextBox1"runat="server"></asp:TextBox><asp:ButtonID="Button1"runat="server"Text="Button"/>

</

contenttemplate>

<

Triggers>

<

asp:AsyncPostBackTriggerControlID="GridView1"EventName="RowDataBound"/>

</

Triggers>

</

asp:UpdatePanel>

And theCode behind for RowDatabound event is

protected

void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)

{

try

{

if (!((e.Row.RowType ==DataControlRowType.Pager) || (e.Row.RowType ==DataControlRowType.Header) || (e.Row.RowType ==DataControlRowType.Footer)))

{

System.Web.UI.

ClientScriptManager cs = Page.ClientScript;//Assign Row Index. This row index used in finding the ID of the clicked rowint intRowIndex = e.Row.RowIndex;

e.Row.Attributes.Add(

"onClick", cs.GetPostBackEventReference(this, intRowIndex.ToString().Trim()));

e.Row.Attributes.Add(

"onKeyDown","if( event.keyCode == 13 ) " + cs.GetPostBackEventReference(this,"KEYDOWN" +"$" + e.Row.DataItemIndex.ToString().Trim()));

}

}

catch (System.Exception ex)

{

//OnError(ex);

}

}

The code looks good, did you try a easy test to see if the postback is hidden?

http://alpascual.com/blog/al/archive/2006/12/21/Code-Snip-_2200_AJAX-Timer_2200_.aspx

Try the sample below and let me know if you see the postback


Thanks for the Quick Response.

But i could not get exactly what you want to convey.

regards,

Parimal


Ok, wrap a asp:button around an updatepanel and let me know if you see the postback

Hi,

The button is working fine without any post back. The Post back is happening when Grid Row is clicked as it call the RaisePostBack event to get the Row details. That event is coded as we have not used any command template in Grid.

regards,

Parimal


OnRowDatabound would not make sense for an async trigger. The user clicking the row and getting a postback via the javascript you added to the onclick is not the same. If you take out the trigger and just add ChildrenAsTriggers="true" to the UpdatePanel it would probably work as you expect.

One other thing - in this code:

"onClick", cs.GetPostBackEventReference(this, intRowIndex.ToString().Trim()));

e.Row.Attributes.Add(

"onKeyDown","if( event.keyCode == 13 ) " + cs.GetPostBackEventReference(this,"KEYDOWN" +"$" + e.Row.DataItemIndex.ToString().Trim()));

Change "this" to GridView1. You want to create a postback for your gridview, not the whole page. Since you're creating a custom postback you'll also need to register for event validation, or disable event validation in your page.


Thanks for the response. But still post back is happening. I will explain in details

1. I have a Gridview RowDataBound event which fires when Data is bounded to Grid.

2. I have aRaisePostBackEvent which fires when the row in the Grid is selected and this causes the Post Back event.

3. Aslo my UserControl is implementingIPostBackEventHandler interface.

Thanks in Advance,

Parimal

postback outside updatepanel

Hello,

I have a label outside an updatepanel which i would like to update at the same time as the updatepanel.

So is there a way to do that without placing the label inside another updatepanel?

Any suggestion?

I think you cant do it unless u change 'EnablePartialRendering' property of your script manager to 'false'. which means refresh the whole page not just the update panel.


It is not possible, you have wrap the label in an update panel and set the update mode to always.

Postback Page controls go reverse video

I'm using master pages, and have various content pages using the same paster page, with an update panel in my paster page, that wraps my content pages. All works very well.

However, on some content pages if I double click my rows in my Gridview to cause an edit of that record, all the controls on the page are reverse video for a brief second, this is only true on some content pages, not all. I've recreated one of the content pages in question from scratch, same issue.

Has anyone else ran into this reverse video issue before?

No,I have never ran into this issue before.So I'm afraid I donn't have any idea on it if you don't provide with a repro of it.

Regards

postback problem

Hi,

I have a control in my update panel which gets data from the database. The trigger for the update panel is a button control. its working fine ( i mean partial page update is happening) when i run my application.

But when this page is opened from an other user's browser, the whole page ( with all the other controls outside the update panel ) is being posted back on button click.

Any help is appreciated.

Hi developer_dotnet,

The same page has different behaviour in another users browser. Can you past your code here so we can analyze it. Thanks

Regards,


Hi developer,

developer_dotnet:

its working fine ( i mean partial page update is happening) when i run my application.

.

You mean in your development environment or you have published your website on this spot ?

developer_dotnet:

But when this page is opened from an other user's browser, the whole page ( with all the other controls outside the update panel ) is being posted back on button click.

First, suggest that we should use a debug tool such as Web Development Helper to make sure whether it make a asynchronous post or not.

If not , we should pay our attention to check if Asp.Net Ajax Extension V1.0 has been installed in the machine which host your website. http://ajax.asp.net/docs/InstallingASPNETAJAX.aspx .If Aajx ControlToolkit Controls used in your application, please add "AjaxControlToolkit.dll" to your bin folder.

If yes , please check the web.config settings .http://ajax.asp.net/docs/ConfiguringASPNETAJAX.aspx

If the problem cannot been resolved by doing these, please show your simple source code here.


I had a similar issue of partial postback. I have made it into a seperate <table> and it worked.


Hi all,

If an Ajax-Enabled page doesn't work properly in the browser, we may do some checking on the broswer security and privacy setting.

The following table lists required browser security and privacy settings for both user browsing and site development. In all cases, the recommended settings are the default settings for that browser.

Internet Explorer 6

Make sure that theInternet Zone in the Security Zones settings is set toMedium.

Internet Explorer 7

Make sure that theInternet Zone in the Security Zones settings is set toMedium-High.

FireFox 1.5 or later versions

In theTools menu underOptions, make sure thatEnable JavaScript is selected.

Opera 9.0 or later versions

In theTools menu underQuick preferences, make sure thatEnable JavaScript is selected.

Safari 2.0 or later versions

ClickSafari,Preferences,Security, and then Web Content and make sure thatEnable JavaScript is selected.

Hope it helps.

Postback problem using a usercontrol inside an update panel that is inside a masterpage

Hi all,

I have been messing around with this all day and its starting to get on my nerves i'm probably missing something really simple but I was hoping someone could shed some light on it or perhaps point me in the right direction..

As I said in thesubject of the post, I have a user control inside an update panel, that resides in the master page, now my problem is when the user control goes to perform a post back I get that nasty "Invalid callback or postback argument error" Can someone help me to rectify this issue? Basically all the control needs to do is hide one panel inside it and show another on a link buttons click even.. There is other code in there too..

The simplified code for the master page is as follows..

<%

@dotnet.itags.org.MasterLanguage="VB"CodeFile="redcellar.master.vb"Inherits="redcellar" %>

<%

@dotnet.itags.org.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %>

<%

@dotnet.itags.org.RegisterSrc="login.ascx"TagName="login"TagPrefix="uc2" %>

<%

@dotnet.itags.org.RegisterSrc="controls/memberdeals.ascx"TagName="memberdeals"TagPrefix="uc1" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml"xml:lang="en"lang="en">

<

headrunat="server"><metahttp-equiv="content-type"content="text/html;charset=utf-8"/><linkrel="stylesheet"type="text/css"media="screen, projection"href="stylesheets/screen.css"/><!--[if lte IE 6]>

<link rel="stylesheet" type="text/css" media="screen, projection" href="http://links.10026.com/?link=stylesheets/screen-ie.css" /><![endif]-->

<linkrel="stylesheet"type="text/css"media="screen, projection"href="stylesheets/order.css"/><!--[if lte IE 6]>

<link rel="stylesheet" type="text/css" media="screen, projection" href="http://links.10026.com/?link=stylesheets/order-ie.css" /><![endif]-->

<scripttype="text/javascript"src="scripts/borders.js"></script><scripttype="text/javascript"src="scripts/misc.js"></script><title></title>

</

head>

<

body><formid="form1"runat="server"><asp:ScriptManagerEnablePartialRendering="true"ID="masterScriptManager"runat="server"/><asp:UpdatePanelID="masterUpdatePanel"runat="server"><ContentTemplate><!-- container --><divid="container">

<p>page content is here</p>

</div><uc2:loginID="Login1"runat="server"/></ContentTemplate></asp:UpdatePanel>

And the code for the control is:

<%

@dotnet.itags.org.ControlLanguage="VB"Debug="true"AutoEventWireup="false"CodeFile="login.ascx.vb"Inherits="login"Strict="true" %><asp:PanelID="pnlLoginContainer"CssClass="modalPopup"runat="server"><divid="normal"><asp:PanelID="pnlLogin"runat="server"style="overflow: auto;"><divstyle="width: 160px; float: right;"><asp:linkbuttonID="lbClose"cssclass="modalClose"Text=""runat="server"/><asp:ImageID="Image1"runat="server"ImageUrl="~/images/member-red-large.gif"/></div><div><br/><h3id="normalpage_heading">

Member sign in.

</h3><br/><asp:LabelID="Label1"runat="server">Welcome back!</asp:Label><br/><br/><tablecellspacing="0"><trclass="datarow"><tdclass="itemheader"><asp:LabelID="Label2"runat="server"Text="email"/></td><tdclass="itemcontent"colspan="2"><asp:TextBoxID="txtEmail"runat="server"MaxLength="255"/></td></tr><trclass="datarow"><tdclass="itemheader"><asp:LabelID="Label3"runat="server"Text="password"/></td><tdclass="itemcontent"colspan="2"><asp:TextBoxID="txtPassword"runat="server"MaxLength="50"TextMode="Password"/><asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="txtpassword"Display="Dynamic"ErrorMessage="*"/></td></tr><trclass="datarow"><tdclass="itemheader"> </td><tdclass="itemcontentsmall"><asp:CheckBoxID="chkRememberMe"runat="server"Text="remember me"/></td><tdclass="itemcontentsmall"style="text-align: right;"><asp:LinkButtonID="lbForgotPassword"runat="server"CausesValidation="False"Text="forget your password?"/></td></tr></table><br/><divclass="link"id="signin-link"><asp:LinkButtonID="cmdLogin"runat="server"Text="sign in"/></div><br/><asp:LabelID="lblLoginMsg"runat="server"ForeColor="Red"></asp:Label><br/></div><div><asp:LabelID="Label4"runat="server">Are you a new user? You must register</asp:Label><asp:LinkButtonID="lbRegister"runat="server"CausesValidation="False"Text="here!"ToolTip="Click here to register.">here!</asp:LinkButton></div></asp:Panel><asp:PanelID="pnlForgotPass"runat="server"Width="100%"style="overflow: auto;"Visible="False"><divstyle="width: 160px; float: right;"><asp:linkbuttonID="Linkbutton1"cssclass="modalClose"Text=""runat="server"/><asp:ImageID="Image2"runat="server"ImageUrl="~/images/member-red-large.gif"/></div><div><p>

Forgot you password?

</p><asp:LabelID="Label5"runat="server">email</asp:Label><asp:TextBoxID="txtForgotPassEmail"runat="server"></asp:TextBox><asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ControlToValidate="txtForgotPassEmail"Display="Dynamic"ErrorMessage="*"></asp:RequiredFieldValidator><asp:RegularExpressionValidatorID="RegularExpressionValidator1"runat="server"ErrorMessage="You must enter a valid email!"ControlToValidate="txtForgotPassEmail"SetFocusOnError="True"ValidationExpression="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@dotnet.itags.org.([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"Display="Dynamic"></asp:RegularExpressionValidator><br/><br/><asp:LabelID="lblResponseMessage"runat="server"></asp:Label><br/><pstyle="text-align: right;"><asp:ButtonID="cmdForgotPass"runat="server"Text="submit"/> </p></div></asp:Panel></div></asp:Panel>

The relevant code behind for this is:

ProtectedSub lbForgotPassword_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles lbForgotPassword.Click

pnlLogin.Visible =

False

pnlForgotPass.Visible =

TrueEndSub

Some help with this would be greatly appreciated.. :)

I'm still stuck with this one :S Any ideas?


After eliminating one thing at a time in my masterpage I found that this was the culprit, commenting it out did the trick..

<form method="get" action="">
<p><label for="search">Find a wine:</label>
<input type="text" id="search" onfocus="if(value=='eg: Henschke') value=''" value="eg: Henschke" />
<input type="image" src="http://pics.10026.com/?src=images/go.gif" value="Go" id="go" /></p>
</form>


does anyone have any idea why??

Postback Slowdown

I have a page that contains a table inside an update panel. The table is 10 columns wide and when the page is initially loaded it only contains the header row and a + under the table to add a row. The problem I have is after adding 4 rows the 5th slows down a lot. And from then on addings more rows gets slower and slower. Whenever the + is clicked it causes the update panel to update and dynamically recreate the table with another row. So it starts by just creating the header. The first time you click the + it creates the header and the 1st row. The next time it creates the Header and 1st and 2nd rows.. and so on.

I cannot figure out a way to speed this up, and as the user approaches 10 rows it begins to slow down to 3 to 4 seconds after htiting the button that anything happens. I think the problem is the viewstate is getting huge and causing it to be much slower. I cannot even get update progress images to work. They don't pop up right away, and when they do pop up they go away immediatly.

Any suggestions on ways to improve the speed? Or I am stuck dealing with a slow page.

Can you post any code?


You're right. The viewstate gets sent back for every AJAX call which means that adding a row

may as well be posting the whole page to the server from the servers point of view.

Use this plugin to see what's being sent over the wire:http://www.nikhilk.net/Project.WebDevHelper.aspx

Check outhttp://smarx.com/posts/delayed-load-with-an-updatepanel.aspx

This shows the oposite of what you're doing.

What you need to do is just update the new row instead of the whole grid.

HTH,

Jonathan.


Is there a way to add a row without recreating the whole table? If I update the panel without recreating the table the table goes away right now.

Thanks for the plugin, I will have to check that out.


Try to set <compilation debug = "false" />

may it will improve some ammount of performance..


If you have each row in a div for example:

<div id="table">
 <div id="row1">hello row 1</div>
<div id="row2">Hello row 2</div>
</div>
<asp:Button ID="clickme" runat="server" OnClientClick="javascript:updateTable(); return false;" Text="Add Row" />

Then you could do the following in JavaScript:

<script type="text/javascript">
function updateTable()
{
var table = document.getElementById("table");
table.innerHTML = table.innerHTML + "<div id='row3'>hello row 3</div>";
}
</script>

HTH,

Jonathan.



I have the same problem. Luckily, after optimizing the 'retrieval time'/row, the speed was acceptable for the number of rows I wanted to display.

If you want speed, you can try using the JavaScript method above, and don't update via Updatepanel. So your buttons change the data behind the scenes (without postback), while calling the JavaScript to show the updates.

Postback to Open Window

i have a button in an update panel that checks through some business logic and if errors/warnings are generated i need to report them to the user.

i have no room on the screen to use for this and would like to show a dialog/window with anything to report.

anyone any ideas on how i could achieve this?

cheers

you can try to build a message control that has absolute position (CSS) , and it located in the center of the page (on top of every elements of page (using z-index)) with ok and close button.

the message control will be placed in every page and have it hidden before any message send, maybe you want to put it in master or basepage if there are a lot of pages going to use the control.


Use javascript:window.alert('Your message here!');


If you're using the AJAX Toolkit, check out theModalPopup Extender.

If you're not, jQuery'sBlockUI plugin is a nice way to accomplish that as well.


thanks for all the feedback.

i eventually used the modalpopup to handle this and works perfectly.

thanks again all...

Postback with button IN Update panel

Hello,

Q, I have 2 update panel's, one panel has 3 button's in it, say button1, button2, button3. Now i need to find a way to have a whole page postback with button1 (in update panel1) and a partial postback on button2 (also in panel1) . Is this posible.

Thanks in advange

Greetings Henk

hello.

well, you can try to add a dummy button outside the panel and then when the user clicks the button you'd call the click method over the other button...


In Atlas 1.0 we'll have a way to tell the UpdatePanel that certain controls should cause a regular postback even though they're inside the UpdatePanel. For now you'll have to use a workaround (such as the one described previously).

Thanks,

Eilon


Hmm, I tryed that, but that did not sucseed. I get the error btnDumie does not exist or sumthing like that. the problem is (I think that the submit button is only visible after an panelupdate, so that panel can't acces other elements on the page??)

I hope there is another sollution.


If it's possible in your scenario you could try to divide up your page such that the regular-postback button isn't inside an UpdatePanel. Once Atlas 1.0 is released you'll be able to do this very easily, but it's not quite ready yet.

Thanks,

Eilon


I am having the same issue. When is Atlas 1.0 due for release?

Thanks,

Murali


Here's the Atlas roadmap:http://weblogs.asp.net/scottgu/archive/2006/09/11/_2200_Atlas_2200_-1.0-Naming-and-Roadmap.aspx

Thanks,

Eilon


hello.

well, that post gives some clues, but no spcific date. btw, when are you guys start sharing the current versions you're developing with us? after all, i've been using atlas for months now and i've seen several posts where you guys say something like: "well, in v1.0 that problem is solved" or "you'll be able to do that easilly"...this just isn't enough!

according to the team's comments, it's as if you're changing several internal key parts of atlas. it's not that i'm against it, but you should also keep in mind that there are several people building applications with atlas and it' won't be a lot of fun to find out that v1.0 is out and that everything is completly different (when compared with the ctps!).

thanks.


I think the reason that we're not giving out a date is that there isn't a specific date chosen yet. What we will have is public previews of the new 1.0 Atlas (soon, but I'm not surehow soon). We'll also have a comprehensive document that describes the changes between the older Atlas CTPs and the new Atlas 1.0 CTPs so you can scan through it and identify any changes that you will have to make.

Thanks,

Eilon

Posting Back From Client

Hello,

I have a question about posting back from the client. How do I cause an update panel to update from the client? What I want to do is pop up another window, do some things on it, and have it update a gridview on the page that opened the window. I'm assuming I can do this with javascript. Can anyone point me in the right direction?

Thanks,

Nick

Anyone have any suggestions?

PRB: Master Pages and Update Panels/Script Manager - AJAX Magic not working

I have a master page that has the script manager control and a content place holder

I have a content page that is using the above master page and with a gridview control wrapped in an update panel

When the content page doesn't use master pages and the script manager is placed within the content page along with the panel, everything works fine

The problem arises when the master page has the script manager and thhe content page just has the update panel with the gid view. It seems to be doing a regular postback and the ajax plumbing doesn't seemto have any effect..

I also tried adding a page initi handler and specifying the trigger in the code behind but with no luck..

generated page source with script manager in master page is listed below. Why does gettting a common master page scnario be so difficult to getv it working..Please point me in the right direction

<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('_ctl0:ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['t_ctl0:ContentPlaceHolder1:panel1'], [], [], 90);

//]]>
</script>


Genertated source when the script managersits on the page and the content page does not use any master pages

<script <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tpanel1'], [], [], 90);

//]]>
</script>

Hi Ajaxnewbie,

Could you please post your code, so we can see how you have implemented it. Thanks

Regards,


Good question... I have exactly the same problem. I wish there would be a valid answer for this post.

thanks!

Prefetching Images

I am using the update panel, and the timer control to automatically change a person's profile text, and their photo (small 65x65 pixels). Everything works well so far, except the transition is not always smooth for the photo.

Before the images/photos become cached in the browser, the default broken (link-to-image) image shows up, before the relevant photo loads. After that image loads the first time, the transition is smooth.

Is there a way to prefetch these images (approximately 8) when the page loads?

Thanks,

Karls

The easiest way I know of is to create a .js function to preload the images. Something like:

function preload(){
var imageUrls = ["img1.jpg","img2.jpg","img3.jpg"];
var images = [];
for(var i=0;i<imageUrls.length;i++){
var image = new Image();
image.src = imageUrls[i];
images.push(image);
}
}

That you'd call that function during pageLoad(). Setting the 'src' of the image object should cause the browser to start downloading that image.


Nice,

I would like to try that, but I am having a problem converting this to VB. Can anyone convert this?Huh?


No, i'ts javascript.


Ahh, makes sense now.

Thanks.

Monday, March 26, 2012

Preserving focus on UpdatePanel update

Hello, ?I would like to be able to update an UpdatePanel?on?one?part?of?the?screen?while?users?are?writing?into?a?textbox?on?another?part?of?the?screen.

When I do that now, the textbox in which the user is entering text loses focus whenever UpdatePanel updates (once every 5 seconds on account of a Timer control within the updatepanel)

How can I preserve focus?

Yours
Andreas KnudsenIf the textbox is also within anoother Update Panel (or ths ame one), trye moving it out. In the worst case you can use Scriptmanager.SetFocus from the server side code.
If the textbox is also within anoother Update Panel (or ths ame one), try moving it out. In the worst case you can use Scriptmanager.SetFocus from the server side code.
The TextBox is outside any UpdatePanel,

I do not want to always set the focus to a?particular textbox, but to
preserve the focus on whichever textbox the user is using as the UpdatePanel happens to Update.

Is that possible at all?

Preserving the scroll position of a treeview in an update panel

Hi There,

I have a treeview control in a panel with scrollbars. I want to preserve the scroll position and I have this code which works absolutely fine in firefox, but it doesn't in IE. Can somebody please get back to me, if you have experienced this problem and solved it.

Also I noticed that if I put an alert (commented), it works fine, which is absolutely weird.

Thanks a lot!!

<scripttype="text/javascript">

var scrollTop;

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function BeginRequestHandler(sender, args)

{

var elem = document.getElementById('<%= treePanel.ClientID %>');

scrollTop=elem.scrollTop;

}

function EndRequestHandler(sender, args)

{

//alert(scrollTop);

var elem = document.getElementById('<%= treePanel.ClientID %>');

elem.scrollTop = scrollTop;

}

</script>

I noticed one more weird thing. I have roles set up on this application. If a user is in the admin role, this works fine. But if the user is not in that role, then the scrolling is not preserved, whenever a node is selected. I have absolutely no idea why this is happening..This is the case only in IE. Firefox has no problem at all.

Any suggestions are greatly appreciated..

Thanks a lot!!


Change:

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

to:

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoadedHandler);

and change the name of your function. endRequest happens when control has been returned to the browser, but everything may not have been rendered on the page. Your code is getting ahead of itself.


Thanks a lot for your suggestion. It still doesn't work...thisis what I have..

<scripttype="text/javascript">

var scrollTop;

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoadedHandler);

function BeginRequestHandler(sender, args)

{

var elem = document.getElementById('<%= treePanel.ClientID %>');

scrollTop=elem.scrollTop;

}

function PageLoadedHandler(sender, args)

{

var elem = document.getElementById('<%= treePanel.ClientID %>');

elem.scrollTop = scrollTop;

}

</script>


IE evidently has difficult with scrollTop under certain DOCTYPE definitions.

Replace elem.scrollTop = scrollTop; with

elem.scrollTo(0,scrollTop);


Unfortunately, scrollTo is not recognized in IE 7. I am not sure about IE 6.

As I have mentioned earlier, there is one more weird thing. I have roles set up on this application. If a user is in the admin role, this (script with scrollTop) works fine. But if the user is not in that role, then the scrolling is not preserved, whenever a node is selected. I have absolutely no idea why this is happening..This is the case only in IE. Firefox has no problem at all.

Thanks.


http://www.eggheadcafe.com/tutorials/aspnet/7dd57635-0587-42ba-ae73-f52449e653bf/aspnet-ajax-maintain-scr.aspx

http://forums.asp.net/p/1150033/1873660.aspx

http://aspnet.4guysfromrolla.com/articles/111704-1.aspx

<pages smartNavigation="true"MaintainScrollPositionOnPostback="true"/>

Usually People loves to maintain the scroll postiion. But requirment is reverse, Here is the trick, create an script tag after the scriptmanager and put the following lines:

<script type="text/javascript">var prm = Sys.WebForms.PageRequestManager.getInstance();prm.add_beginRequest(beginRequest);function beginRequest(){ prm._scrollPosition = null;}</script> 

Let me know if this helpful to you


I got this working from the links in the second link you have posted..

I have onscroll="javascript:saveScroll();" on the panel and..

<script type='text/javascript'>
var scrollLeft = 0;

function setScroll()
{
if(document.getElementById('<%= Panel1.ClientID %>').scrollLeft != scrollLeft)
{
document.getElementById('<%= Panel1.ClientID %>').scrollLeft = scrollLeft;
}
}

function saveScroll()
{
scrollLeft = document.getElementById('<%= Panel1.ClientID %>').scrollLeft;
}
</script>

The condition forces the scrolling..

Thanks a lot.

Also thanks to Mr. Budda for his suggestions...

Prevent CHECKBOX in Update Panel

Hi there,i'm using CHECKBOX in Gridview Template Panel, and My Gridview is under UpdatePanel. The update panel will be refresh every 3 second using timer. how to prevent CHECKBOX from 'unchecking' when the user have already check the CHECKBOX ?Thanks.

Hi,

can you identify if it is due to slowly loading update panel or checkbox just loses its checked state on postback?

You can place just a button anywher eon the page (disable your timer before) and see if checkbox loses its checked value when you click this button.

-yuriy


The CHECKBOX just loses its checked state. I dont think palce a button anywhere is the solution for the application, since it'll have so much button. any ideas ?Thanks.

Hi,

an approach would be saving the checked boxes in an hidden field in the page. When a postback occurs, you parse the hidden field and extract the info about the checked boxes.

Since the GridView might be bound to different data each time, you have to associate an ID to each checkbox. The ID might be that of a database row, for example.

Then, when you're binding the GridView, you check whether the ID is in the list of checked boxes. If it is, you select the corresponding checkbox.

Sounds little complicated, but it should work.

Print Problem With Updatepanel

HI,

Iam facing problem with update panel.I has a reportviewer and a updatepanel.Updatepanel consists of Reportviewer.Whenever i click on Print Option of Reportviewer,Postback ocurs But no print dialog appears.(So no print).How to Print report when it is is in updatepanel.

When i remove updatepanel Print wrks .But when i keep it in updatepanel NO PRINT ocurs

Plz help ...It is Very urgent

With regards,

Mahender

Any chance you can post the code?
<asp:UpdatePanelID="ReportViewerUpdatePanel"runat="server"UpdateMode="Conditional "ChildrenAsTriggers="true"><ContentTemplate><asp:UpdateProgressID="ReportViewerUpdateProgress"runat="server"><ProgressTemplate><divstyle="display:block; "><center>

Loading ...

<imgalt=""src="Images/Updatepanel/loading.gif"/></center></div></ProgressTemplate></asp:UpdateProgress>

<rsweb:ReportViewerID="ReportViewer1"runat="server"BackColor="WhiteSmoke"ProcessingMode="Remote"Height="100%"ShowBackButton="true"ShowFindControls="false"DocumentMapWidth="50%"ShowParameterPrompts="false"ShowRefreshButton="true"ShowReportBody="false"ShowPromptAreaButton="true"ShowToolBar="true"ShowExportControls="true"ShowZoomControl="false"Width="100%"EnableTheming="true"ShowCredentialPrompts="true"DocumentMapCollapsed="true"LinkActiveColor="Black"LinkActiveHoverColor="Chocolate"LinkDisabledColor="Gray"ExportContentDisposition="AlwaysInline"EnableViewState="true"ShowPrintButton="true"><ServerReportReportServerUrl="http://localhost/ReportServer$SQL"/></rsweb:ReportViewer>

</ContentTemplate><Triggers><asp:AsyncPostBackTriggerControlID="DropdownMenuLinkButton"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

Incode behind of One event.In my case Buttonclick

this is Code

ReportViewer1.ProcessingMode =

ProcessingMode.Remote;Uri u =newUri("http://localhost/ReportServer$SQL");

ReportViewer1.ServerReport.ReportServerUrl = u;

ReportViewer1.ServerReport.ReportPath =

"/thad/Report1";

ReportViewer1.AsyncRendering =

true;

ReportViewer1.ShowBackButton =

true;

ReportViewer1.ShowFindControls =

true;

ReportViewer1.ShowRefreshButton =

true;

ReportViewer1.ShowPrintButton =

true;

ReportViewer1.ShowReportBody =

true;

ReportViewer1.ShowPromptAreaButton =

true;

ReportViewer1.ShowToolBar =

true;// ReportViewer1.ShowExportControls = true;

ReportViewer1.ShowZoomControl =

true;

ReportViewer1.ToolTip =

"Report Viewer";

ReportViewer1.Width =

Unit.Percentage(100);

ReportViewer1.Height =

Unit.Percentage(100);//ReportViewer1.EnableTheming = true;

ReportViewer1.ShowCredentialPrompts =

true;

ReportViewer1.LinkActiveColor = System.Drawing.

Color.Black;

ReportViewer1.LinkActiveHoverColor = System.Drawing.

Color.Chocolate;

ReportViewer1.LinkDisabledColor = System.Drawing.

Color.Gray;

ReportViewer1.ShowPrintButton =

true;
<asp:UpdatePanelID="ReportViewerUpdatePanel"runat="server"UpdateMode="Conditional "ChildrenAsTriggers="true"><ContentTemplate><asp:UpdateProgressID="ReportViewerUpdateProgress"runat="server"><ProgressTemplate><divstyle="display:block; "><center>

Loading ...

<imgalt=""src="Images/Updatepanel/loading.gif"/></center></div></ProgressTemplate></asp:UpdateProgress>

<rsweb:ReportViewerID="ReportViewer1"runat="server"BackColor="WhiteSmoke"ProcessingMode="Remote"Height="100%"ShowBackButton="true"ShowFindControls="false"DocumentMapWidth="50%"ShowParameterPrompts="false"ShowRefreshButton="true"ShowReportBody="false"ShowPromptAreaButton="true"ShowToolBar="true"ShowExportControls="true"ShowZoomControl="false"Width="100%"EnableTheming="true"ShowCredentialPrompts="true"DocumentMapCollapsed="true"LinkActiveColor="Black"LinkActiveHoverColor="Chocolate"LinkDisabledColor="Gray"ExportContentDisposition="AlwaysInline"EnableViewState="true"ShowPrintButton="true"><ServerReportReportServerUrl="http://localhost/ReportServer$SQL"/></rsweb:ReportViewer>

</ContentTemplate><Triggers><asp:AsyncPostBackTriggerControlID="DropdownMenuLinkButton"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

Incode behind of One event.In my case Buttonclick

this is Code

ReportViewer1.ProcessingMode =

ProcessingMode.Remote;Uri u =newUri("http://localhost/ReportServer$SQL");

ReportViewer1.ServerReport.ReportServerUrl = u;

ReportViewer1.ServerReport.ReportPath =

"/thad/Report1";

ReportViewer1.AsyncRendering =

true;

ReportViewer1.ShowBackButton =

true;

ReportViewer1.ShowFindControls =

true;

ReportViewer1.ShowRefreshButton =

true;

ReportViewer1.ShowPrintButton =

true;

ReportViewer1.ShowReportBody =

true;

ReportViewer1.ShowPromptAreaButton =

true;

ReportViewer1.ShowToolBar =

true;// ReportViewer1.ShowExportControls = true;

ReportViewer1.ShowZoomControl =

true;

ReportViewer1.ToolTip =

"Report Viewer";

ReportViewer1.Width =

Unit.Percentage(100);

ReportViewer1.Height =

Unit.Percentage(100);//ReportViewer1.EnableTheming = true;

ReportViewer1.ShowCredentialPrompts =

true;

ReportViewer1.LinkActiveColor = System.Drawing.

Color.Black;

ReportViewer1.LinkActiveHoverColor = System.Drawing.

Color.Chocolate;

ReportViewer1.LinkDisabledColor = System.Drawing.

Color.Gray;

ReportViewer1.ShowPrintButton =

true;
<asp:UpdatePanelID="ReportViewerUpdatePanel"runat="server"UpdateMode="Conditional "ChildrenAsTriggers="true"><ContentTemplate><asp:UpdateProgressID="ReportViewerUpdateProgress"runat="server"><ProgressTemplate><divstyle="display:block; "><center>

Loading ...

<imgalt=""src="Images/Updatepanel/loading.gif"/></center></div></ProgressTemplate></asp:UpdateProgress>

<rsweb:ReportViewerID="ReportViewer1"runat="server"BackColor="WhiteSmoke"ProcessingMode="Remote"Height="100%"ShowBackButton="true"ShowFindControls="false"DocumentMapWidth="50%"ShowParameterPrompts="false"ShowRefreshButton="true"ShowReportBody="false"ShowPromptAreaButton="true"ShowToolBar="true"ShowExportControls="true"ShowZoomControl="false"Width="100%"EnableTheming="true"ShowCredentialPrompts="true"DocumentMapCollapsed="true"LinkActiveColor="Black"LinkActiveHoverColor="Chocolate"LinkDisabledColor="Gray"ExportContentDisposition="AlwaysInline"EnableViewState="true"ShowPrintButton="true"><ServerReportReportServerUrl="http://localhost/ReportServer$SQL"/></rsweb:ReportViewer>

</ContentTemplate><Triggers><asp:AsyncPostBackTriggerControlID="DropdownMenuLinkButton"EventName="Click"/>

</Triggers>

</asp:UpdatePanel>

Incode behind of One event.In my case Buttonclick

this is Code

ReportViewer1.ProcessingMode =

ProcessingMode.Remote;Uri u =newUri("http://localhost/ReportServer$SQL");

ReportViewer1.ServerReport.ReportServerUrl = u;

ReportViewer1.ServerReport.ReportPath =

"/thad/Report1";

ReportViewer1.AsyncRendering =

true;

ReportViewer1.ShowBackButton =

true;

ReportViewer1.ShowFindControls =

true;

ReportViewer1.ShowRefreshButton =

true;

ReportViewer1.ShowPrintButton =

true;

ReportViewer1.ShowReportBody =

true;

ReportViewer1.ShowPromptAreaButton =

true;

ReportViewer1.ShowToolBar =

true;// ReportViewer1.ShowExportControls = true;

ReportViewer1.ShowZoomControl =

true;

ReportViewer1.ToolTip =

"Report Viewer";

ReportViewer1.Width =

Unit.Percentage(100);

ReportViewer1.Height =

Unit.Percentage(100);//ReportViewer1.EnableTheming = true;

ReportViewer1.ShowCredentialPrompts =

true;

ReportViewer1.LinkActiveColor = System.Drawing.

Color.Black;

ReportViewer1.LinkActiveHoverColor = System.Drawing.

Color.Chocolate;

ReportViewer1.LinkDisabledColor = System.Drawing.

Color.Gray;

ReportViewer1.ShowPrintButton =

true;

Probblem with Menu control inside an update panel

Hi,

I have a master page with a script manager ,update panel and Content Palce Holder. in the default page which uses the masterpage I have added a menu control, textbox and a button. I have two problems which I have seen in the past in other versions of ajax. I have not coded anything other than just these controls on a page

1) I could click on button all day long and there is no java script error but as soon as I click on a menu item I get javascript error saying:

Line:221

Char:20

Error '0.cells' is null or not an object

code: 0

2) I can not get my CSS sheet work in my app theme for the background images. I have the following code in my CSS

.Menu1BackGround

{

background-image:url(/Images/Menu1_Background.bmp);

}

and I have assigned the it to the menu. Nothing happens as if it does not recognize the image path. I could add the background:black to the code and it works fine for the color but not the image. I am not sure if thisis because of the same problem.

Any body have any ideas?

Thanks

Seehttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx#UpdatePanelCompatibleControls. The Menu control is not supported inside an UpdatePanel.

I have been using this piece of javascript to go around the menu problem:

var oldMenu_HideItems = Menu_HideItems;if(oldMenu_HideItems){Menu_HideItems = function(items){if (!items || ((typeof(items.tagName) =="undefined") && (items instanceof Event))) { items = __rootMenuItem; }if(items && items.rows && items.rows.length == 0){ items.insertRow(0); }return oldMenu_HideItems(items);} }
I got it from the asp:menu javascript code and I hook it to "patch" the problem.
Adding it to a page where a menu resides makes the javascript error go away. 

http://forums.asp.net/thread/1517884.aspx

HTH


Menu control is not compatable with AJAX.

I m also facing sme problem..

Saturday, March 24, 2012

Problem adding Atlas to an existing site

I have created a test atlas site and successfully used the update panel with some dropdown lists. Now I want to incorporate Atlas into an existing web site. I created a test page in the existing web site and recreated my test page in the existing site. The Atlas components to not seem to work... instead of an ajax update it is doing a full postback.

Here are the things I've checked:

- Atlas dll is included in bin
- Web.config file is updated and matches the test site config exactly
- Test web page is exactly the same as on the test site
- The .asbx extension is registered correctly
- The web site is configured for .Net 2.0

I'm not even sure how to figure out what else is going on here. Any other suggestions or things I can look at here? Thanks!

hello.

have you created a simple page on that site? if so, post it here so that we can see if there's anything wrong with it or if it's a configuration problem...


I have done a simple page on the test site (which works) and the exact same page in the existing site (which doesn't work) so I'm not sure the code provides any value. But here is another clue. When I add the trigger to the update panel through the designer, switch to code view, and then back to designer I get an "error creating control"

It says: Triggers could not be initialized. Triggers could not be added to the collection. Details: Object does not match target type.

Here is the web page code:

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="IssueTest.aspx.cs" Inherits="ProjectTrack_IssueTest" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head id="Head1" runat="server"> <title>Untitled Page</title> </head><body> <form id="form1" runat="server"> <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"> </atlas:ScriptManager> <asp:DropDownList ID="ClientsDDL" runat="server" DataSourceID="RDI_DB" DataTextField="CO_NAME" DataValueField="Client_ID" OnSelectedIndexChanged="ClientsDDL_SelectedIndexChanged" AutoPostBack=true> </asp:DropDownList><atlas:UpdatePanel runat="server" ID="UpdatePanel1" Mode="Conditional"> <Triggers> <atlas:ControlEventTrigger ControlID="ClientsDDL" EventName="SelectedIndexChanged" /> </Triggers> <ContentTemplate> <asp:DropDownList ID="ProjectsDDL" runat="server" DataTextField="PROJ_NAME" DataValueField="PROJECT_NO" AppendDataBoundItems=true AutoPostBack="True" OnSelectedIndexChanged="ProjectsDDL_SelectedIndexChanged"><asp:ListItem>Select a client</asp:ListItem> </asp:DropDownList> </ContentTemplate> </atlas:UpdatePanel> <asp:DropDownList ID="PhaseDDL" runat="server" DataTextField="DESCRIPTION" DataValueField="PHASE" AppendDataBoundItems=true AutoPostBack="True"><asp:ListItem>Select a project</asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="TaskDDL" runat="server" DataTextField="TASK" DataValueField="TASK" AppendDataBoundItems=true><asp:ListItem>Select a phase</asp:ListItem> </asp:DropDownList> <asp:SqlDataSource ID="RDI_DB" runat="server" ConnectionString="<%$ ConnectionStrings:RDI_DevelopmentConnectionString%>" SelectCommand="SELECT [Client_ID], [CO_NAME] FROM [CLIENTS]"></asp:SqlDataSource> <asp:SqlDataSource ID="ProjectListDB" runat="server" ConnectionString="<%$ ConnectionStrings:RDI_DevelopmentConnectionString%>" SelectCommand="SELECT [PROJECT_NO], [PROJ_NAME] FROM [PROJ_NO] WHERE ([CLIENT_ID] = @.CLIENT_ID)"> <SelectParameters> <asp:ControlParameter ControlID="ClientsDDL" Name="CLIENT_ID" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="PhaseListDB" runat="server" ConnectionString="<%$ ConnectionStrings:RDI_DevelopmentConnectionString%>" SelectCommand="SELECT [PHASE], [DESCRIPTION] FROM [PHASE] WHERE (([CLIENT_ID] = @.CLIENT_ID) AND ([PROJECT_NO] = @.PROJECT_NO)) ORDER BY [DESCRIPTION]"> <SelectParameters> <asp:ControlParameter ControlID="ClientsDDL" Name="CLIENT_ID" PropertyName="SelectedValue" Type="Int32" /> <asp:ControlParameter ControlID="ProjectsDDL" Name="PROJECT_NO" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="TasksListDB" runat="server" ConnectionString="<%$ ConnectionStrings:RDI_DevelopmentConnectionString%>" SelectCommand="SELECT [TASK], [DESCRIPTION] FROM [TASK] WHERE ([PHASE] = @.PHASE)"> <SelectParameters> <asp:ControlParameter ControlID="PhaseDDL" Name="PHASE" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource>   </form></body></html>

hello.

tell me something: can you run the following code with success:

<atlas:scriptmanager runat="server" id="manager" enablepartialrendering="true" />

<atlas:updatepanel runat="server" id="panel">
<contenttemplate>
<asp:button runat="server" Text="Submit" />
<%=DateTime.Now.ToString() %>
</contenttemplate>
</atlas:updatepanel>


Same results... in my existing web site it causes a postback. In my test web site it does an ajax update (no postback). Does that tell you anything? Thanks.

hello again.

one more question:

open the previous page on the browser, right click on it and look at the source code. find the script element that is used to load the js file (you might have several elements that user the webresource.axd on the page; in this case, you'll have to repeat it to all the items you find). copy the address that is in the src attribute of the script element and add it to the url of the page you have in the browser (you'll probably have to delete a portion of the url before adding the value you've copied from the source file).

can you get the file? ie, can you get the js atlas file? if you can't get the file (you should see the tradidional save dialog), then you have a iis configuration problem...

Problem after update to RTM from RC

Hi, I have VS 2005 Pro with sp1 installed.

I uninstalled RC version correctly, after that I installed RTM version. I open Visual Studio and reload my solution, but when I try to select a form in browse solution it turns out to be impossible.
So I tried to uninstall RTM and reinstall it but the situation is the same.

Are there someone can help me?

Thanks in advance.

Filippo Macchi.

hi

Can you give me more detail about "select a form in browse solution it turns out to be impossible"

like you can not click ? or solution can not open? is it only for AJAX project?

thanks


The solution is opening correctly. The problem is that when I click the toolbox the system play a sound like as "operation not permitted", so it's impossible to select a form.

This problem occured also when I start Visual Studio without open any exiting project, usually you can click into the toolbox, but now I can't do it. And that sound keeps repeating itself.

Problem by using adrotator and timer control for an atlas project

Hello.
I want to show the advertisements without page posting. I have an adrotator,an xml file,timer control,and an update panel. When I run the project only one advertisement is shown on the page then the page is blank.
My aspx.pages codes:

<div>
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">
</atlas:ScriptManager>
<atlas:TimerControl ID="TimerControl1" Interval="2000" runat="server" />
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/ads.xml" />
</ContentTemplate>
</atlas:UpdatePanel>
</div
and ads.xml

<?xml version="1.0" encoding="utf-8" ?
<Advertisements>
<Ad>
<ImageUrl>Images/Book1.jpg</ImageUrl>
<NavigateUrl>http://www.Amazon.com/Book1.aspx</NavigateUrl>
<AlternateText>Book1</AlternateText>
<Impressions>2</Impressions>
<Keyword>Book</Keyword>
</Ad
<Ad>
<ImageUrl>Images/Book2.jpg</ImageUrl>
<NavigateUrl>http://www.Amazon.com/Book2.aspx</NavigateUrl>
<AlternateText>Book2</AlternateText>
<Impressions>2</Impressions>
<Keyword>Book</Keyword>
</Ad
<Ad>
<ImageUrl>Images/Book3.jpg</ImageUrl>
<NavigateUrl>http://www.Amazon.com/Book3.aspx</NavigateUrl>
<AlternateText>Book3</AlternateText>
<Impressions>3</Impressions>
<Keyword>Book</Keyword>
</Ad
<Ad>
<ImageUrl>Images/Book4.jpg</ImageUrl>
<NavigateUrl>http://www.Amazon.com/Book4.aspx</NavigateUrl>
<AlternateText>Book4</AlternateText>
<Impressions>3</Impressions>
<Keyword>Book</Keyword>
</Ad
</Advertisements
can you help me?The timer isn't in the UpdatePanel so you need to add the Tick event as a trigger.
Thanks for your reply but I tried it before too.
my aspx pages codes:

<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" >
<ErrorTemplate>
There was an error processing your action.<br />
<span id="errorMessageLabel"></span>
<hr />
<button type="button" id="okButton">OK</button>
</ErrorTemplate>
</atlas:ScriptManager>
<atlas:TimerControl ID="TimerControl1" Interval="2000" runat="server" OnTick="TimerControl1_Tick" />
<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" >
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/Reklam2.xml" />
</ContentTemplate>

<Triggers>
<atlas:ControlEventTrigger ControlID="TimerControl1" EventName="Tick" />
</Triggers>
</atlas:UpdatePanel
timer tick event

protected void TimerControl1_Tick(object sender, EventArgs e)
{
UpdatePanel1.Update();
}

what is the wrong , I can not find the problem.
waiting for your reply...

Hello,

Is there anybody who can help me about this problem?


help,where is the error?
Hello,I solved the problem.

My aspx page

<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
<br />
<atlas:TimerControl ID="TimerControl1" runat="server" Interval="2000">
</atlas:TimerControl>
<br />
<div>
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/Reklam.xml" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="AdRotator1" EventName="AdCreated" />
</Triggers>
</atlas:UpdatePanel>
</div>
</form
I added a trigger.
<Triggers>
<atlas:ControlEventTrigger ControlID="AdRotator1" EventName="AdCreated" />
</Triggers>
Help of this trigger,when a new advertisement is taken,updatepanel is updating. So without refreshing advertisements are shown on the web site. Reklam.xml is similar to ads.xml, only the name is Turkish.


Thanks for your example, i follow your example to solved my problem:)
not matter

Problem in adding a new AJAX tool

Hi ..

In my project, I have this problem:

We know that update panel does not work with FileUpload control. But I found that there is a FileUpload tool specially for AJAX, I found it in this link:

http://www.asp.net/community/control-gallery/browse.aspx?category=32

and I install it.

The problem that after I installed it. I did not know when I should put FUA.dll file. Is it inside ASP.NET ? if true . Where inside it cuz there are alot of folders ?

Can you help me in my problem Crying?

With my best regards, kholood A

Hi,

I am afraid you should refer to the Author of theFileUpload tool for support.

Good luck!