Showing posts with label correctly. Show all posts
Showing posts with label correctly. Show all posts

Wednesday, March 28, 2012

Extender controls arent actually doing anything??

Everything builds correctly but I'm haven't seen any of the extender features in action.

I have a text box and a watermark extender. Nothing happens when I view the page... Also when I tried to run the examples the extender features didn't work there either... Its seems like I'm missing something somwhere... (maybe I need to copy some script files to an asp.net folder or place the ajaxcontroltoolkit.dll somewhere)

Here's what I did for installation:
Downloaded the examples from herehttp://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=AtlasControlToolkit to my desktop
Grabbed the ajaxcontroltoolkit.dll and dragged it to my toolbox of visual studio

Lastly... my other ajax stuff is working fine (using script manager and updatepanel)
Maybe there's an installation package for the ajaxcontroltoolkit that I missed.

Here's my sample page:

<formid="form1"runat="server"><div>

<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>
<ajaxToolkit:TextBoxWatermarkExtenderID="TextBoxWatermarkExtender1"runat="server"TargetControlID="TextBox1"WatermarkText="test"></ajaxToolkit:TextBoxWatermarkExtender>
<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox></form>

Thanks,
Paul

well... uninstalling and reinstalling everthing ajax related fixed it

Wednesday, March 21, 2012

Event to catch unavailable database with CascadingDropDown

I have the CascadingDropDown control working correctly with 2 DropDownLists. They're both being used with a database and I want to be able to catch any database errors (for example an unavailable db) before the DropDownLists display the dreaded [Method error 500]. From there I can hide the form panel and display a panel with a friendly error message. How would I go about doing that? With an ObjectDataSource I could catch it during the OnSelected event...

I haven't used the CascadingDropDown control but I assume it using the standard ASP.Net Ajax Library for async. calls. So se if the following way of handling exceptions in ASP.Net Ajax will work for you:

http://fredrik.nsquared2.com/viewpost.aspx?PostID=396&showfeedback=true

http://fredrik.nsquared2.com/viewpost.aspx?PostID=395&showfeedback=true

http://fredrik.nsquared2.com/viewpost.aspx?PostID=394&showfeedback=true


Fredrik

This doesn't seem to be working for me... I don't know if the CascadingDropDown behaves differently than the the UpdatePanel or if there's a problem with my configuration. I followed your examples and still receive the error as an item within the dropdown box on the page rather than an alertbox. I also attempted to change the innerHTML of a label using the PageRequestManager to no avail. Otherwise, very good articles that should come in handy with other AJAX controls.