I try to program a page, where the content of the database will be loaded into the CKEditor then the content can be changed and saved again. The page is devided into different areas and if the user doubleclicks on an area the Editor should appear. With the following Code, Loading the Content and Doubleclick works, but I can't find any solution to save it back to the database:
<%# Page Title="" Language="C#" MasterPageFile="~/Templates/MasterPageBasic.master"
AutoEventWireup="true" CodeFile="EditTemplate.aspx.cs" Inherits="Templates_EditTemplate" %>
<%# Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="Styles/EditTemplate.css" rel="stylesheet" type="text/css" />
<script src="Scripts/EditTemplate.js" type="text/javascript" />
</asp:Content>
<asp:Content ID="ContentPlaceHolder2" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
<div id="header1" class="editable">
<asp:FormView ID="FormViewHeader" runat="server" DataSourceID="SqlDataSourceHeader"
DefaultMode="Edit">
<EditItemTemplate>
<asp:TextBox ID="HeaderTextBox" runat="server" Text='<%# Bind("Header") %>' />
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourceHeader" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [Header] FROM [PageContent]"></asp:SqlDataSource>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="javascript:;" target="_top" onclick="MM_nbGroup('down','group1','navbar','',1)"
onmouseover="MM_nbGroup('over','navbar','','',1)" onmouseout="MM_nbGroup('out')">
<img src="Images/Clean-Navigation-Bar-by-willyepp.png" alt="" name="navbar" border="0"
id="Articles" onload="" /></a>
</td>
</tr>
</table>
<div id="sidebarLeft" class="editable">
<asp:FormView ID="FormViewSidebarLeft" runat="server" DataSourceID="SqlDataSourceSidebarLeft"
DefaultMode="Edit">
<EditItemTemplate>
<asp:TextBox ID="SidebarLeftTextBox" runat="server" Text='<%# Bind("SidebarLeft") %>' />
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourceSidebarLeft" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [SidebarLeft] FROM [PageContent]"></asp:SqlDataSource>
</div>
<div id="sidebarRight" class="editable">
<asp:FormView ID="FormViewSidebarRight" runat="server" DataSourceID="SqlDataSourceSidebarRight"
DefaultMode="Edit">
<EditItemTemplate>
<asp:TextBox ID="SidebarRightTextBox" runat="server" Text='<%# Bind("SidebarRight") %>' />
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourceSidebarRight" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [SidebarRight] FROM [PageContent]"></asp:SqlDataSource>
</div>
<div id="content" class="editable">
<asp:FormView ID="FormViewContent" runat="server" DataSourceID="SqlDataSourceContent"
DefaultMode="Edit">
<EditItemTemplate>
<asp:TextBox ID="ContentTextBox" runat="server" Text='<%# Bind("Content") %>' />
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourceContent" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [Content] FROM [PageContent]"></asp:SqlDataSource>
</div>
<div id="footer" class="editable">
<asp:FormView ID="FormViewFooter" runat="server" DataSourceID="SqlDataSourceFooter"
DefaultMode="Edit">
<EditItemTemplate>
<CKEditor:CKEditorControl ID="CKEditorFooter" Text='<%# Bind("Footer") %>' runat="server"
CustomConfigurationsPath="../ckeditor/config.js" ToolbarSet="Footer" EditorAreaCSS="/css/editor.css"
Width="947px" Height="100px">
</CKEditor:CKEditorControl>
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourceFooter" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [Footer] FROM [PageContent]"></asp:SqlDataSource>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
</asp:Content>
JS-File
//<![CDATA[
// Uncomment the following code to test the "Timeout Loading Method".
// CKEDITOR.loadFullCoreTimeout = 5;
window.onload = function () {
// Listen to the double click event.
if (window.addEventListener)
document.body.addEventListener('dblclick', onDoubleClick, false);
else if (window.attachEvent)
document.body.attachEvent('ondblclick', onDoubleClick);
};
function onDoubleClick(ev) {
// Get the element which fired the event. This is not necessarily the
// element to which the event has been attached.
var element = ev.target || ev.srcElement;
// Find out the div that holds this element.
var name;
do {
element = element.parentNode;
}
while (element && (name = element.nodeName.toLowerCase()) && (name != 'div' || element.className.indexOf('editable') == -1) && name != 'body')
if (name == 'div' && element.className.indexOf('editable') != -1)
replaceDiv(element, element.id);
}
var cke_header1;
var cke_sidebarLeft;
var cke_sidebarRight;
var cke_content;
function replaceDiv(div, id) {
//First check if an editor is already open, if so close it
if (cke_header1)
cke_header1.destroy();
if (cke_sidebarLeft)
cke_sidebarLeft.destroy();
if (cke_sidebarRight)
cke_sidebarRight.destroy();
if (cke_content)
cke_content.destroy();
switch (id) {
case "header1":
cke_header1 = CKEDITOR.replace(div, {
height: "200", width: "950",
language: 'en',
uiColor: '#350e1e',
toolbar: 'MyToolbar'
});
break;
case "sidebarLeft":
cke_sidebarLeft = CKEDITOR.replace(div, {
height: "690", width: "180",
language: 'en',
uiColor: '#350e1e',
toolbar: 'MyToolbar'
});
break;
case "sidebarRight":
cke_sidebarRight = CKEDITOR.replace(div, {
height: "690", width: "180",
language: 'en',
uiColor: '#350e1e',
toolbar: 'MyToolbar'
});
break;
case "content":
cke_content = CKEDITOR.replace(div, {
height: "690", width: "500",
language: 'en',
uiColor: '#350e1e',
toolbar: 'MyToolbar'
});
break;
}
}
So I tried to use only one FormView, now loading from database and save back works. But the Doubleclick to get the Editor doesn't work anymore. Also I can't save anymore if I add the link to the Javascript file. (I used the same one as below.
Does anyone has a solution for this?
<%# Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%# Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link href="Templates/Styles/EditTemplate.css" rel="stylesheet" type="text/css" />
<script src="Scripts/EditTemplate.js" type="text/javascript" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
<asp:FormView ID="FormViewPage" runat="server" DataSourceID="SqlDataSourcePage" DefaultMode="Edit">
<EditItemTemplate>
<div id="header1" class="editable">
<asp:TextBox ID="HeaderTextBox" runat="server" Text='<%# Bind("Header") %>' />
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="javascript:;" target="_top" onclick="MM_nbGroup('down','group1','navbar','',1)"
onmouseover="MM_nbGroup('over','navbar','','',1)" onmouseout="MM_nbGroup('out')">
<img src="Templates/Images/Clean-Navigation-Bar-by-willyepp.png" alt="" name="navbar" border="0"
id="Articles" onload="" /></a>
</td>
</tr>
</table>
<div id="content" class="editable">
<asp:TextBox ID="ContentTextBox" runat="server" Text='<%# Bind("Content") %>' />
</div>
<div id="sidebarLeft" class="editable">
<asp:TextBox ID="SidebarLeftTextBox" runat="server" Text='<%# Bind("SidebarLeft") %>' />
</div>
<div id="sidebarRight" class="editable">
<asp:TextBox ID="SidebarRightTextBox" runat="server" Text='<%# Bind("SidebarRight") %>' Visible="True" />
</div>
<div id="footer" class="editable">
<asp:TextBox ID="FooterTextBox" runat="server" Text='<%# Bind("Footer") %>' />
</div>
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Aktualisieren" />
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Abbrechen" />
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSourcePage" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT [Header], [Content], [SidebarLeft], [SidebarRight], [Footer] FROM [PageContent]"
UpdateCommand="UPDATE PageContent SET Header = #Header, [Content] = #Content, SidebarLeft = #SidebarLeft, SidebarRight = #SidebarRight, Footer = #Footer">
<UpdateParameters>
<asp:Parameter Name="Header" />
<asp:Parameter Name="Content" />
<asp:Parameter Name="SidebarLeft" />
<asp:Parameter Name="SidebarRight" />
<asp:Parameter Name="Footer" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
</asp:Content>
Related
I'm using CommandItemSettings in MasterTablreView to show Export to Excel button.
The CommandItemSettings section of the grid is displayed when Grid has at least 10 records or when I select less than 10 records using a Pager.
However, with less than 10 records after I click the Search button, the CommandItemSettings section is not there and I cannot export the data into an Excel.
Here is the aspx file:
MOSS2 Merchants Report:
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" EnableAJAX="true">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnSearch">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdMoss2Merchants" LoadingPanelID="RadAjaxLoadingPanel2"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<table class="moss2Search" width="100%">
<tr>
<td colspan="4">
<asp:CustomValidator ID="checkForTwoDates" ClientValidationFunction="AtLeastOneDate_ClientValidate"
EnableClientScript="True" ErrorMessage="At least one date should be selected" runat="server"></asp:CustomValidator> <br />
<asp:CompareValidator ID="CompareValidator2" ControlToCompare="RadDatePicker1" ControlToValidate="RadDatePicker2" Operator="GreaterThanEqual"
ErrorMessage="Date range is not valid" runat="server"></asp:CompareValidator>
</td>
</tr>
<tr>
<td>
<div runat="server">
<asp:Label runat="server" CssClass="dateLabels">Boarding Start Date</asp:Label>
<telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker1" runat="server" onkeydown="keyPress(this, event)">
<Calendar runat="server">
<FastNavigationSettings EnableTodayButtonSelection="true"></FastNavigationSettings>
</Calendar>
</telerik:RadDatePicker>
</div>
</td>
<td>
<div runat="server">
<asp:Label runat="server" CssClass="dateLabels">Boarding End Date</asp:Label>
<telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker2" runat="server" onkeydown="keyPress(this, event)">
<Calendar runat="server">
<FastNavigationSettings EnableTodayButtonSelection="true"></FastNavigationSettings>
</Calendar>
</telerik:RadDatePicker>
</div>
</td>
<td>
<div>
<asp:CheckBox ID="chkMerActive" runat="server" Checked="true" TextAlign="Left"/>Active
</div>
</td>
<td>
<telerik:RadButton RenderMode="Lightweight" runat="server" Text="Search" ID="btnSearch" OnClick="btnSearch_Click"/>
</td>
</tr>
</table>
<asp:Label ID="lblMsg" ForeColor="red" runat="server"></asp:Label>
<br />
</telerik:RadAjaxPanel>
<%----%>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel2">
<telerik:RadGrid
RenderMode="Lightweight"
runat="server"
ID="grdMoss2Merchants"
AllowPaging="True"
AllowSorting="true"
PagerStyle-AlwaysVisible="true"
OnNeedDataSource="BindToDatasource"
OnSortCommand="grdMoss2Merchants_SortCommand"
ViewStateMode="Enabled"
AutoGenerateColumns="false"
OnPageIndexChanged="grdMoss2Merchants_ChangePage"
ClientSettings-Scrolling-ScrollHeight="360px">
<GroupingSettings CaseSensitive="false"/>
<ExportSettings HideStructureColumns="true" ExportOnlyData="true" OpenInNewWindow="true" Excel-Format="Xlsx" IgnorePaging="true" FileName="Moss2Merchants">
<Excel WorksheetName="Moss2Merchants" Format="Xlsx" AutoFitColumnWidth="AutoFitAll" />
</ExportSettings>
<ClientSettings EnableRowHoverStyle="true">
<Scrolling AllowScroll="true" UseStaticHeaders="True"/>
</ClientSettings>
<SortingSettings EnableSkinSortStyles="false" />
<HeaderStyle Width="160px" CssClass="grdHeader" ForeColor="#2E6E9E" />
<MasterTableView AllowNaturalSort="false" CommandItemDisplay="Bottom">
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
<CommandItemStyle HorizontalAlign="Right" />
<PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" PageSizes="5,10,25,50,100" />
<Columns>
<telerik:GridBoundColumn DataField="Moss2 MID" HeaderText="MOSS2 MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DBA" HeaderText="DBA" HeaderStyle-Width="250px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Original MID" HeaderText="ORIGINAL MID" AllowSorting="false" DataFormatString="{0:#}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="BoardingDate"
DataType="System.DateTime"
HtmlEncode="false"
DataFormatString="{0:MM/dd/yyyy}"
SortExpression="BoardingDate"
UniqueName="BoardingDate"
HeaderText="BOARDING DATE"
HeaderStyle-Width="170px"
ShowFilterIcon="false"
/>
<telerik:GridBoundColumn DataField="Status" HeaderText="STATUS" AllowSorting="false"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
The Export To Excel button is showing with Grid having
i'm trying to execute one jquery function, but it giver me an error and i don't know what is going on. It is really kiling me. I don't know what else i can do.
If someone know's how to fix it, please help me.
error:
Exception was thrown at line 5263, column 7 in localhost:8538/Scripts/jquery-1.8.2.js
0x800a139e - JavaScript runtime error: SyntaxError
<%# Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<%# Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
<script src="Script/jquery-1.8.2.js"></script>
<script>
$(document).ready(function () {
setpager();
});
function setpager() {
$("#grdTeste .rgPagerCell:first").find('div').not(".rgInfoPart").css('display', 'none');
$("#grdTeste .rgPagerCell:last").find('.rgInfoPart').css('display', 'none');
}
</script>
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1><%: Title %></h1>
</hgroup>
</div>
</section>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="50%" valign="bottom" height="25">
<font id="tituloTela" style="padding-left:6px"> Feriados </font>
<input id="Button1" type="button" value="button" onclick="setpager();"/>
</td>
</tr>
</tbody>
</table>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<telerik:RadGrid ID="grdTeste" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" CellSpacing="0"
DataSourceID="SqlDataSource" GridLines="None" PageSize="5" OnNeedDataSource="RadGrid1_NeedDataSource" >
<ExportSettings>
<Pdf PageWidth="">
</Pdf>
</ExportSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="COD_FERIADO" DataSourceID="SqlDataSource" CommandItemDisplay="Top" >
<CommandItemSettings AddNewRecordText="Adicionar Novo Registro" RefreshText="Atualizar"/>
<Columns>
<telerik:GridBoundColumn DataField="DATA" FilterControlAltText="Filter DATA column" HeaderText="DATA" SortExpression="DATA" UniqueName="DATA">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NOME" FilterControlAltText="Filter NOME column" HeaderText="NOME" SortExpression="NOME" UniqueName="NOME">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="COD_FERIADO" DataType="System.Int32" FilterControlAltText="Filter COD_FERIADO column" HeaderText="COD_FERIADO" ReadOnly="True" SortExpression="COD_FERIADO" UniqueName="COD_FERIADO">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</MasterTableView>
<PagerStyle Position="TopAndBottom" AlwaysVisible="true"/>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:StringConexao %>"
DeleteCommand="DELETE FROM feriados WHERE (COD_FERIADO = #COD_FERIADO)"
SelectCommand="SELECT DATA, NOME, COD_FERIADO FROM feriados"
UpdateCommand="UPDATE feriados SET NOME = #NOME, DATA = #DATA WHERE (COD_FERIADO = #COD_FERIADO)"
InsertCommand="INSERT INTO feriados VALUES (NEXT VALUE FOR SEQ_FERIADO_NOVA, #DATA, #NOME)">
<DeleteParameters>
<asp:Parameter Name="COD_FERIADO" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="DATA" />
<asp:Parameter Name="NOME" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="NOME" />
<asp:Parameter Name="DATA" />
<asp:Parameter Name="COD_FERIADO" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
The error is because your are using plain javascript for finding radgrid(telerik controls).
The javascript used for telerik contols is different than the normal javascript for html contols:
To find radgrid with id="grdTeste":
var grdTeste=$find("<%=grdTeste.ClientID%>"); //find radgrid
This will help you to work with radgrid on client side:
Working with Radgrid on client side
I have a page that shows a ckeditor in an update panel. My page is as follows:
<form id="form1" runat="server">
<cc1:ToolkitScriptManager runat="server" ID="ToolkitScriptManager" EnablePartialRendering="true"></cc1:ToolkitScriptManager>
<div>
<asp:Label ID="Label1" runat="server" Text="Hello"></asp:Label><br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<script src="../../../../../ckeditor/ckeditor.js" type="text/javascript"></script>
<asp:TextBox class="ckeditor" ID="tbEditorHeader" runat="server" ClientIDMode="Static" TextMode="MultiLine" Columns="80" Rows="4"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
Has anyone seen this issue? Any known solutions?
Thanks for the help!!
I have a web page that has a masterpage. It has two drop downs. On Selected index chagne of dropdown1, I am calling the dropdown1_selectedindex changed. But nothing happens when I change the selection in the first drop down. I have placed the script manager in the master page. Update panel in the control page. The update panel encloses both the drop downs. Pelase help me. I am a starter and I thought this will be pretty straight forward. What am I missing here?
This is the .aspx
<%# Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.master" CodeBehind="Emailer.aspx.cs" Inherits="ServiceAlertEmailerGUI.Emailer" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<%-- <h2>
Welcome to ASP.NET!
</h2>--%>
<%-- <p>
To learn more about ASP.NET visit www.asp.net.
</p>--%>
<%-- <p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>--%>
<script type="text/javascript">
function HandleIT() {
alert("called");
}
</script>
<asp:Label ID="Label1" runat="server" Text="Status:"></asp:Label>
<asp:RadioButton ID="RadioButton1" Text="New Alert" GroupName="Status" runat="server" />
<asp:Label ID="Label2" runat="server" Text="Select Application: "></asp:Label>
<asp:UpdatePanel runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList ID="ddApplicationList" runat="server"
OnSelectedIndexChanged="ddApplicationList_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:RadioButton ID="RadioButton2" GroupName="Status" Text="Update" runat="server" />
<asp:Label ID="Label3" runat="server" Text="Select Service: "></asp:Label>
<asp:DropDownList ID="ddServcieList" runat="server" >
</asp:DropDownList>
</ContentTemplate>
<%--
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddApplicationList" EventName="ddApplicationList_SelectedIndexChanged" />
</Triggers>
--%>
</asp:UpdatePanel>
<br />
<asp:RadioButton ID="RadioButton3" GroupName="Status" Text="Resolved" runat="server" /><br />
<asp:RadioButton ID="RadioButton4" GroupName="Status" Text="Resolved (No Email)" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Build Template" Width="144px" />
<br />
<asp:RadioButton ID="RadioButton5" GroupName="Status" Text="Root Cause" runat="server" /><br />
<br />
</asp:Content>
Here is master page
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="ServiceAlertEmailerGUI.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<asp:ScriptManager ID="AjaxManager" EnablePageMethods ="true" EnablePartialRendering = "true" runat="server">
</asp:ScriptManager>
<div class="page">
<div class="header">
<div class="title">
<h1>
Service Alert Emailer
</h1>
</div>
<%-- <div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ Log In ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
</div>--%>
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Emailer"/>
<%--<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>--%>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
</body>
</html>
Thanks guys for trying to help.
I figured out the mistake in the trigger. In the trigger, eventname should be the event name SelectedIndexChanged rather that ddApplicationList_SelectedIndexChanged.
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddApplicationList" EventName = "SelectedIndexChanged"/>
</Triggers>
sorry I lost the other link that gave me this answer.
<asp:UpdatePanel ID="uppnl_Select_File_Format" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="button-bg-2">
<div class="button-text-2">
<asp:LinkButton ID="btnCreate" ValidationGroup="CreateVersion" runat="server" OnClick="btn_Create_OnClick"
CausesValidation="true">Add Title</asp:LinkButton>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnCreate" />
<asp:AsyncPostBackTrigger ControlID="ddlstMedia" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upprogpnl" runat="server" AssociatedUpdatePanelID="uppnl_Select_File_Format">
<ProgressTemplate>
<asp:Image ID="img_Loading" runat="server" ImageUrl="~/App_Themes/Admin/LoadingImages/loading1.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
Loader image is not shown when button click event ...
Please reply me clearly, i'm a beginner......
thisi is the code for showing loader gif in time of processing
<ProgressTemplate>
<div Style="z-index: 105; left: 450px;position: absolute; top: 230px" >
<center>
<img id="imgloader" runat="server" src="images/loading.gif" />
</center>
</div>
</ProgressTemplate>
.