Saturday, March 24, 2012

Atlas to Ajax Conversion

I am very new to Ajax and unfortunately I was kind of thrown right into the middle of it. My predecessor created a webpage using Atlas and never finished it before he left and now I need to convert it to Ajax and get it finished. I am in the process of converting it but I have come across this one section of code that I cannot seem to figure out the conversion. Can someone please help me?

PublicSub SetConfirm(ByVal buttonAs LinkButton,ByVal TextAsString,ByVal ConfirmExtenderAs AtlasControlToolkit.ConfirmButtonExtender)

ConfirmExtender.TargetProperties.Clear()

Dim propAsNew AtlasControlToolkit.ConfirmButtonProperties

prop.ConfirmText = Text

prop.TargetControlID = button.ID

ConfirmExtender.TargetProperties.Add(prop)

EndSub

Thanks in advance for the help.

You need to get the AJAX Control Toolkit, and use that to replace the ATLAS Control Toolkit.

If that's not it, provide a little more detail on the specific s of the problem, and we'll get it.


I just realized that it might be the way it is being used in the *.ascx page. Here is the code:

<asp:ImageID="Image7"runat="server"ImageUrl="~/Images/optionbullet_Lightblue-gray.gif"/>

<asp:LinkButtonID="LBtnDelete"runat="server"Text="Delete"/>

<cc1:ConfirmButtonExtenderID="LbtnDeleteExtender"runat="server"/>

I would really appreciate any help I can get with this.


If I change AtlasControlToolkit.ConfirmButtonExtender to AjaxControlToolkit.ConfirmButtonExtender like VS2005 recomends it underlines ConfirmExtender.TargetProperties in blue as well asAtlasControlToolkit.ConfirmButtonProperties. I expectedAtlasControlToolkit.ConfirmButtonProperties to be underlined but the suggested alternates don't match. I get the following options:

AjaxControlToolkit.ConfirmButtonExtender

AjaxControlToolkit.AnimationScripts

AjaxControlToolkit.ToggleButtonExtender

I would assume the first one but it when I go to fix ConfirmExtender.TargetProperties it does give me any thing even remotely close to TargetProperties.

PublicSub SetConfirm(ByVal buttonAs LinkButton,ByVal TextAsString,ByVal ConfirmExtenderAs AjaxControlToolkit.ConfirmButtonExtender)

ConfirmExtender.TargetProperties.Clear()

Dim propAsNewAjaxControlToolkit.ConfirmButtonExtender

prop.ConfirmText = Text

prop.TargetControlID = button.ID

ConfirmExtender.TargetProperties.Add(prop)

EndSub

No comments:

Post a Comment