Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Wednesday, March 28, 2012

AJAX Update Panel Issues with Master Pages

Hello all, I am having issues using AJAX on my aspx content pages. I have a Master Page that contains a Script Manager and I want to use an Update Panel on some of my content pages. When I do this my aspx content page does not recogize any element on the page that is in the Update Panel, nor does it recognize the Update Panel. It underlines every control on the page and displays "unknown element" errors. I can still build my solution and run the app with no problems, and the AJAX seems to function correctly, but when I view the source code of the aspx page I get errors. If I try and change properties in Design view my Visual Studio locks up. If I use an Update Panel or any other Ajax extensions on a page that is not a content page of a Master Page everything works perfectly.

Is this a common problem with Master Pages? Is there a solution? I tried to search for this problem but did not turn many results. Any help or direction would be appreciated! This makes it very hard to develop. I am using Version 1.0 of ASP.Net AJAX.

Yes it is an issue a lot of people see I would assume. I just answered another post in regards to this here

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

AjaxButter


Installing SP1 for Visual Studio 2005 fixed this problem.

AJAX Update Panel And ModalPopUpExtender

hi,

Im using the ModalPopupExtender ,Its work's just fine that is the model pop up i display contains a Drop down list a grid etc etc now on an Event of the Selected index changed another Drop downlist is suppose to be filled ..but it does not happen ..!! For the First time the pop up is displayed and the selected index is changed nothing happens the second time onwards the events on those particular controls work,that applies to all controls within the ModalPopUp..!! Pls help me regarding this..!!!!

Thanks n Regards

Francis P.

Put each drop down list in an updatepanel with updatemode="conditional"

On the event handler for dropdown1 changed, do what you must on dropdown2andforce an updatepanel2.update()


Hi,

Ive tried that but still no changes..!!!

I ll explain you the whole code..

The Main Page is within an update panel which also contains the Target to the ModalPopUp now in the Modal popup i ve put the Drop down list into an Update panel and on selected index change of that Dropdown list i get all the values needed to bind and bind that to the second drop down list..And do the

UpdatePanel3.Update() ("UpdatePane3.update()is the Update Panel which contains the second drop down list") but still nothing happens..

Thanks n Regards

Francis P.


- Have u set the dropdownlist as a trigger for updatepanel?

- Tried setting some breakpoints to see what gets "hit"?

Monday, March 26, 2012

AJAX toolkit "access denied" problem

I am redesigning a site to include AJAX. On a new page that I created that contains a Tab Control, when I copy the page to the site's server, why would I be getting an "access denied" problem for a page that allows anonymous users? When I remove all references and controls for AJAX, it works fine.

Thanks for the information

Some more information on this problem...it seems as if it may be an IIS permission problem. All the AJAX controls run fine on the development machine, but in examining the website even further, any page with interaction, like a textbox with a watermark, I am getting Access Denied errors. Any help on this problem would be appreciated.

Saturday, March 24, 2012

Ajax timer update does not work when it updates a text box with some special characters

The Ajax time seems to have some trouble updating a panel that contains a text box with some special characters. I managed to replicate the problem using a very simple page that is inlcuded below. The problem is that the second update causes an error 500 from the development server of Visual Studio.

The page just has an update panel with a single multi-line text box. The code for the timer update assignes the text box the string "<br>\n".

Does anyone know how to solve this problem?

The Page is:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox> <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"> </asp:Timer> </ContentTemplate> </asp:UpdatePanel> </form></body></html>
The code for the update is:

public partialclass _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e) { }protected void Timer1_Tick(object sender, EventArgs e) { TextBox1.Text = "<br>\n;"; }}

Regards,

Ivan

By the way, I do realize that the problem is with special characters that trigger the ASP.NET security validations. Changing the text in the Text Box to HTML encoded is not an option, because in this text box the user should be entering and editing HTML code.

AJAX Timer bug when it updates a panel containing a single Text Box with the characters "&

The Ajax timer seems to have a problem updating a panel what contains a text box that has the characters "<br>\n". Attached is the source code for a very simple page a single multi-line text box where the timer code-behind just assigns the textbox the string "<br>\n". When run, the second update will cause an 500 error from the server.

This error does not happen when the text is something else, say "Hello World".

I assume that the problem is that the sequence "<br>\n" in the text box causes the timer Java Script to break somehow. Anyone knows oh to solve this problem? I am using Ajax 1.0 and the Visual Studio Development Server.

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox> <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"> </asp:Timer> </ContentTemplate> </asp:UpdatePanel> </form></body></html>

The code behind for the time update is:

protected void Timer1_Tick(object sender, EventArgs e) { TextBox1.Text ="<br>\n;"; }

Ivan.

I am sorry, the code for the post got mangled but the editor. The code behind for the time update should be:

public partialclass _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e) { }protected void Timer1_Tick(object sender, EventArgs e) { TextBox1.Text = "<br>\n"; }}

Apparently, the string <br> is detected as a potentially harmfull string. One solution is to HTML encode the string. However, I do need to display the string <br> in the text box, not <br>. The user must be able to edit the HTML code that we will use.

Ivan.


Apparently, the string <br> is detected as a potentially harmfull string. One solution is to HTML encode the string. However, I do need to display the string <br> in the text box, not <br>. The user must be able to edit the HTML code that we will use.

Ivan.