Showing posts with label complete. Show all posts
Showing posts with label complete. Show all posts

Monday, March 26, 2012

Property Page for Controls?

Ok, I may just be a complete idiot, but are there extended property pages available for the controls in the toolkit at design time?

For instance, the PasswordStrength extender has a property calledTextStrengthDescriptions but as far as I can see, it is not on the properties page.

The documentation states it is initialized with this code:

<ajaxToolkit:PasswordStrength ID="PS" runat="server" TargetControlID="TextBox1"DisplayPosition="RightSide"StrengthIndicatorType="Text"PreferredPasswordLength="10"PrefixText="Strength:"TextCssClass="TextIndicator_TextBox1"MinimumNumericCharacters="0"MinimumSymbolCharacters="0"RequiresUpperAndLowerCaseCharacters="false"TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"TextStrengthDescriptionStyles="cssClass1;cssClass2;cssClass3;cssClass4;cssClass5CalculationWeightings="50;15;15;20" />

But for the life of me, I cannot find this block of code anywhere - so I end up having to set the values in code. Can anyone tell me where the above init code is located or how to access the other non-displayed properties of a control in the designer?

Thanks!

Hi,

Please download the sample applicationhere, then open the PasswordStrength.aspx page, you will find it in the html source.

Wednesday, March 21, 2012

Question about updatepanel

Hi,
I got a problem about update panel.
My scenario is that:
I have two tasks, each of which is triggered by buttons..
"A" needs 10 seconds to complete, and "B" needs 2 seconds.
After clicking A button, the user click B within 10 seconds.
Normally the program will stop doing A and start doing B, right?
But once I use the UpdatePanel, it just keep doing A and doesn't do B.
WHY?

Here is my example code:

<body> <form id="form1" runat="server"> <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True"/> <asp:Button ID="ButtonA" runat="server" Text="intensive task" /> <asp:Button ID="ButtonB" runat="server" Text="interrupt task" />  <asp:Label ID="Label2" runat="server" /> <atlas:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" /l> </ContentTemplate> <Triggers> <atlas:ControlEventTrigger ControlID="ButtonA" EventName="Click" /> </Triggers> </atlas:UpdatePanel> <atlas:UpdateProgress ID="UpdateProgress1" runat="server"> <ProgressTemplate> Processing... </ProgressTemplate> </atlas:UpdateProgress> </form> </body>
Protected Sub ButtonA_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles ButtonA.Click System.Threading.Thread.Sleep(10000) Label1.Text ="Intensive task suceeded!!"End Sub Protected Sub ButtonB_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles ButtonB.Click Label2.Text ="Interrupted task succeeded!!"End Sub
I need the normal function, that is to stop A and do B when clicking ButtonB, and also the function of partial refreshing. Any ideas?Could anyone give me some suggestion?