You could also debug the javascript and inspect the child controls:
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 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" />
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
function pageLoaded(sender, args) {
var updatedPanels = args.get_panelsUpdated();
if (updatedPanels.length > 0) {
debugger;
}
}
</script
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="label1" runat="server"></asp:Label>
<asp:Button ID="button1" runat="server" OnClick="button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html
Wish the above can help you.
Sunday, March 11, 2012
Getting values of a controls which are in update panel
Use the .children collection (http://msdn.microsoft.com/workshop/author/dhtml/reference/collections/children.asp) to find all the controls.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment