Monday, March 26, 2012

Programmatically setting ConfirmText of ConfirmButtonExtender

I was wondering if it's possible to set the ConfirmText of the CBE programatically at run-time?
I can't seem to access the ConfirmText property in my VB code.

ThanksYes, it is. The code looks something like:

<%@. Page Language="VB" %><%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) CBE.TargetProperties(0).ConfirmText = "Here I am" End Sub</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="SM" runat="server"> </atlas:ScriptManager> <asp:Button ID="Button1" runat="server" Text="Button" /> <atlasToolkit:ConfirmButtonExtender ID="CBE" runat="server"> <atlasToolkit:ConfirmButtonProperties TargetControlID="Button1" ConfirmText="You can't see me" /> </atlasToolkit:ConfirmButtonExtender> </div> </form></body></html>

No comments:

Post a Comment