Showing posts with label runat. Show all posts
Showing posts with label runat. Show all posts

Wednesday, March 28, 2012

Accessing DropShadow properties through javascript

I am have trouble accessing the properties of a drop shadow through javascript. My dropshadow looks like this

<asp:Panel runat="server" id="registeredusersTab"></asp:Panel>
<atlasToolkit:DropShadowExtender id="dsregisteredusersTab" runat="server">
<atlasToolkit:DropShadowProperties targetcontrolid="registeredusersTab" opacity="0" rounded="false" trackposition="true">
</atlasToolkit:DropShadowProperties
And I'm trying to use the following script on click of another link...
<script>
$object('dsregisteredusersTab').set_Opacity(0);
</script
Its basically can't find dsregisteredusersTab. Any help would be greatly appreciated...

You need an ID on the properties object itself, not the extender. Check out the DropShadow sample page for an example of this:

<asp:Panel runat="server" id="registeredusersTab"></asp:Panel>
<atlasToolkit:DropShadowExtender id="dsregisteredusersTab" runat="server">
<atlasToolkit:DropShadowProperties targetcontrolid="registeredusersTab" opacity="0" rounded="false" trackposition="true"ID="dsBehavior">
</atlasToolkit:DropShadowProperties>

...

<script>
$object('dsBehavior').set_Opacity(0);
</script>


Thanks

Saturday, March 24, 2012

a simple test

Hi guys,

I have this in HTML:

<atlas:ScriptManager ID="s1" runat="server" EnablePartialRendering="true"/>

<asp:LinkButton ID="linkAtlas" runat="server" PostBackUrl="home.aspx" Text="LinkButton 2 Atlas"OnClick="linkAtlas_Click" />

<atlas:UpdatePanel id="u1" runat="server" Mode="Conditional">
<ContentTemplate>
<asp:Label ID="lblAtlas" runat="server" Text="label under Panel" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="linkAtlas" EventName="Click" />
</Triggers>
</atlas:UpdatePanel>

and the linkAtlas_Click function is:

Protected SublinkAtlas_Click(ByVal sender As Object, ByVal e As System.EventArgs)
lblAtlas.Text = "new (" & 1 * Rnd() * 100 & ")"
End Sub

just a simple test so I can figure out how ATLAS work...

the objective is to click in the link and the label change it's text value without refreshing the page...
the above code should do that, right? well... it doesn't :-(

it doesn't change the value, but if I changeEnablePartialRendering="true" it works fine, but it refreshes the page...

can you help me on this?

Thank you.

Bruno Alexandre
"a Portugueses in K?benhavn, Danmark"

<asp:LinkButton ID="linkAtlas" runat="server"PostBackUrl="home.aspx" Text="LinkButton 2 Atlas"OnClick="linkAtlas_Click" />

The offending code is thePostBackUrl="home.aspx"

If you remove that it will start working. I don't think cross-page postbacks are supported with Atlas UpdatePanels.

Wednesday, March 21, 2012

A question on UpdatePanel

Hi All,

What's the different between 1 & 2?

1. <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate> (Content) </ContentTemplate></asp:UpdatePanel>

2. <asp:UpdatePanel ID="UpdatePanel1" runat="server"> (Content) </asp:UpdatePanel>

Thanks,

Stard

1 is the correct syntax. UpdatePanels have only 2 controls which are allowed inside, <ConentTemplate> and <Triggers>. Add the updatepanel as you in example 1 and place your controls within the ContentTemplate

2 wouldn't work or compile as far as i know

60731 error

I heve the following code

<asp:TextBox ID="txtde_la" runat="server" CssClass="TextBox"
Font-Bold="True" Font-Size="XX-Small" Width="30%" OnInit="txtde_la_Init"></asp:TextBox>
<asp:RegularExpressionValidator ID="validde_la" runat="server" ErrorMessage="*"
Font-Bold="True" ControlToValidate="txtde_la"></asp:RegularExpressionValidator>
<asp:Panel ID="Panel1" runat="server">
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server">
<atlasToolkit:PopupControlProperties PopupControlID="Panel1" Position="Bottom" TargetControlID="txtde_la" ID="foo" />
</atlasToolkit:PopupControlExtender>
<center>
<asp:Calendar ID="Calendar3" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" OnSelectionChanged="Calendar3_SelectionChanged" Width="160px">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="Gray" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel>

protected void txtde_la_Init(object sender, EventArgs e)
{
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ro-RO", false);
DateTime dt = new DateTime();
dt = DateTime.Today;
txtde_la.Text = txtpana_la.Text = dt.ToShortDateString() + " " + System.DateTime.Now.ToShortTimeString();
}

After upgrading to 60731 on Panel at design time I get the following error: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

And another problem with an TextBoxWatermarkExtender on the same page.

After selecting a date on that Calendar the watermark text dissapears.

Sorin

Shawn outlines the Atlas change that introduced locking and the workaround for the resulting problem here:http://forums.asp.net/thread/1358703.aspx.