Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I'm using ajax in my content page which contain several control in page. It could be like dropdownlist, button, gridview and radiobuttonlist. All control is working find except the radiobuttonlist, it always do the postback. Since I'm using master page to control all content page, I have no idea why is not functioning? Therefore, I create a single page without inherit the masterpage, the radiobuttonlist is working. So is it the masterpage problem?

 

Part of the code:

 

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<atlas:UpdatePanel ID="UpdatePanel1" runat="server">

<Triggers>

<atlas:ControlValueTrigger ControlID="RadioButtonList" PropertyName="SelectedValue" />

<atlas:ControlEventTrigger ControlID="Button" EventName="Click" />

<atlas:ControlValueTrigger ControlID="DropDownList" PropertyName="SelectedValue" />

</Triggers>

<ContentTemplate>

.

.

</ContentTemplate>

</atlas:UpdatePanel>

</asp:Content>

 

 

Any help will be appreciate.

Calvin

Posted

Single page without inherit master page where postback without "Refresh the whole page"

 

HTML Code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Settings_TimeTable_Default" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI" TagPrefix="asp" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Test RadioButtonList Page</title>

</head>

<body>

<form id="form1" runat="server">

<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True">

<ErrorTemplate>

Something Wrong to Script Manager

</ErrorTemplate>

</atlas:ScriptManager>

<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional">

<ContentTemplate>

<asp:RadioButtonList ID="rblTest" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblTest_SelectedIndexChanged"

RepeatDirection="Horizontal">

<asp:ListItem>Hide</asp:ListItem>

<asp:ListItem>UnHide</asp:ListItem>

</asp:RadioButtonList> 

<asp:Label ID="lblMsg" runat="server" Text="Test Partial Rendering"></asp:Label>

</ContentTemplate>

</atlas:UpdatePanel>

</form>

</body>

</html>

 

Code Behind:

Partial Class Settings_TimeTable_Default

Inherits System.Web.UI.Page

 

Protected Sub rblTest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

Select Case rblTest.SelectedValue

Case "Hide"

lblMsg.Visible = False

Case "UnHide"

lblMsg.Visible = True

End Select

End Sub

End Class

 

 

-------------------------------------------------------------------------

A page inherit master page where postback "Refresh the whole page"

 

HTML Code:

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Copy of Default.aspx.vb" Inherits="Settings_TimeTable_Default" %>

 

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<atlas:UpdateProgress ID="UpdateProgress1" runat="server">

<ProgressTemplate>

<div id="progressBackgroundFilter"></div>

<div id="processMessage"><br /><br />

<asp:Image ID="ImgLoading" runat="server" SkinID="ImgLoading" />

</div>

</ProgressTemplate>

</atlas:UpdateProgress>

 

 

<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional">

<ContentTemplate>

<asp:RadioButtonList ID="rblTest" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblTest_SelectedIndexChanged"

RepeatDirection="Horizontal">

<asp:ListItem>Hide</asp:ListItem>

<asp:ListItem>UnHide</asp:ListItem>

</asp:RadioButtonList> 

<asp:Label ID="lblMsg" runat="server" Text="Test Partial Rendering"></asp:Label>

</ContentTemplate>

</atlas:UpdatePanel>

 

</asp:Content>

 

Code Behind:

 

Partial Class Settings_TimeTable_Default

Inherits System.Web.UI.Page

 

Protected Sub rblTest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

Select Case rblTest.SelectedValue

Case "Hide"

lblMsg.Visible = False

Case "UnHide"

lblMsg.Visible = True

End Select

End Sub

End Class

Posted

Oh, I omit to upload this part, but it still not working!

 

.....

</ContentTemplate>

 

<Triggers> <---Omitted Part

<atlas:ControlValueTrigger ControlID="rblTest" PropertyName="SelectedValue" />

</Triggers>

 

</atlas:UpdatePanel>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...