Showing posts with label own. Show all posts
Showing posts with label own. Show all posts

Wednesday, March 28, 2012

updatepanel

hi all.

actually m very new to ajax and trying to learnat my own.

i hav installed ajax tool kit and even the dll of ajax.

i have a ajax toolkit enabled website. but in that m not getting the tag <asp:scriptmanager>

as i want to use update panel in my application.

pl help...

Hi,

Your Toolkit controls don't need to be on an updatepanel. The Toolkit-controls don't even need a scriptManager i guess (correct me if I'm wrong).

BUT when you want to use an UpdatePanel, there should be (only) ONE ScriptManager on the top of the page.

Like in the example below:

<%@. Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> </div> </form></body></html>
Please let us know if things work out allright!
Good luck
Wim

hi...

thnks 4 ur reply.

actually my problem was while using the updatepanel, it is giving error as i write script manager tag.

and eror like some system.web.extension is missing. i just uninstall everything and install again...and now i can use both ajax toolkit and ajax ext tools.

thnks again 4 ur prompt reply.Smile


deblendewim:

Your Toolkit controls don't need to be on an updatepanel. The Toolkit-controls don't even need a scriptManager i guess (correct me if I'm wrong).

Hi,

I'm afraid that it's necessary.

ScriptManager injects Microsoft Script Library into the generated page, this library is the core of the ajax. And the ControlToolKit will use it.

Monday, March 26, 2012

UpdatePanel + Invisible control = Problems

Hi Guys,

I created my own UserControl that only contains the following. (The code for a basic DropDownExtender) The control is called ProgEdit

1<cc1:DropDownExtender ID="dde" runat="server" TargetControlID="lblAssigned" DropDownControlID="DropPanel"></cc1:DropDownExtender>
2<asp:Label ID="lblAssigned" runat="server" Text="Label" Style="display: block; width: 300px; padding:2px; padding-right: 50px; font-family: Tahoma; font-size: 11px;" ></asp:Label>
3<asp:Panel id="DropPanel" runat="server" Style="display :none; visibility: hidden;background: url(http://localhost/project/images/ajax-menu-bg.gif) repeat-y 0 0 #FAFAFA; z-index: 1000;">
4 <asp:LinkButton runat="server" ID="lnkName" />
5</asp:Panel>

I've got a seperate page that contains an update panel. The update panel contains a ProgEdit control which is inially invisible.

1<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
2<ContentTemplate>
3 <ds:ProgEdit runat="server" id="progEdit" visible="false" />
4 <asp:Button runat=server ID="btntest" OnClick="VisibleEdit"/>
5</ContentTemplate>
6</asp:UpdatePanel>

The problem: When I click the btnTest the ProgEdit control is set to visible. But the DropDownExtender control doesn't work correctly. (The dropdown image on the side is missing)
Whats wrong?

If I remove the UpdatePanel, the DropDownExtender runs fine.
If I add another ProgEdit anywhere on the page (which isnt set to Visible=false) it runs fine.

Any ideas?

Any ideas?