Please help. I'm new to AJAX and the AJAX Toolkit release is new as of yesterday.
I was using code that adds an attribute for a confirm dialog to my button. It works; but I yesterday removed it to start using AJAX.
- I downloaded and installed the Toolkit last night.
- I followed the HDI (How Do I) video to setup VS 2005 Toolbox to display the new AJAX controls.
- I followed the HDI video on using the ConfirmButtonExtender.
- I have a ScriptManager control on my page.
- By following the HDI video, I succeeded with ConfirmButtonExtender in a practice project before trying it in my development project.
So I click the submit button on another page; and now I can't get the scheme to work. Why no confirm message?
Placing the ConfirmDialogExtender allows me to specify which button control to extend. The HTML looks like this:
<asp:ImageButtonID="imbContinue"runat="server"AccessKey="C"ImageUrl="~/images/Continue.gif"TabIndex="5" /><cc1:ConfirmButtonExtenderID="ConfirmButtonExtender1"TargetControlID="imbContinue"ConfirmText="Please confirm!"runat="server"></cc1:ConfirmButtonExtender>My project existed before AJAX was installed. Do I need to prepare the project somehow to enable AJAX?
(I get NO errors. AJAX seems to be installed properly.)
My next question is going to be how can I connect a custom string to the Button/ConfirmButtonExtender? I build a string during postbacks that occur before the confirmation click occcurs. I thought I'd assign the string to the ConfirmText property under Extender properties on the button.
I would also like to mention that, by following the HDI video, I succeeded with ConfirmButtonExtender in a practice project before trying it in my development project.
Also, I have a ScriptManager control on the dysfunctional page.
I did a few tests.
1. Created a simple page like that demonstrated in the HDI video. It doesn't work in my existing project.
2. Created a new website using the AJAX-Enabled Website template. Then I created the same simple page in this project
Looking at web.config files...Many differences.
I guess I'll try migrating my project to an AJAX-Enabled project.
I copied sections of web.config that existed in the AJAX-Enabled Website project to the web.config of my existing website project.
I had to make sure not to have duplicate sections in my resultant web.config.
I noticed pages on the AJAX-Enabled website specify an updated DOCTYPE. It formerly was XHTML Transitional 1.0. Now it's as follows:<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
I hope I don't have to update the DOCTYPE on all my pages. But maybe it's not a big deal; we'll see.
Also, I had 31 warnings about "schema information not found..."
My research showed that people eliminated these warnings by commenting out the following sections (It worked for me, too):
<!--system.web.extensions-->
<!-- system.webServer>
No comments:
Post a Comment