or
saisie.ClientEvents.OnKeyPress = @"enterSaisie2";function pageLoad() { textSaisie = $find("<%=saisie.ClientID %>"); } function enterSaisie2(e) { if (window.event.type == "keypress" && window.event.keyCode == 13) { try { aSaisie = new String(textSaisie.get_value()); // etc...protected void ExecutiveSummary_EmailReport(object sender, EventArgs e){ StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter htw = new HtmlTextWriter(sw); ExecutiveSummaryReport_RadGrid1.RenderControl(htw);//Error happens here}<telerik:GridButtonColumn CommandName="Confirm1" ConfirmDialogType="RadWindow" ConfirmText="are you sure?" ConfirmTitle="Notice" FilterControlAltText="Filter Confirm column" Text="confirm" UniqueName="Confirm1"> </telerik:GridButtonColumn>function pageLoad() { if (!Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable()) { $(".dropzone h5").hide(); $(".dropzone p").hide(); $(".dropzone").removeClass("dropzone"); } else { $(document).bind({ "drop": function (e) { e.preventDefault(); } }); $(".dropzone").each(function (index) { $(this).bind({ "dragenter": function (e) { dragEnterHandler(e, $(this)); } }) .bind({ "dragleave": function (e) { dragLeaveHandler(e, $(this)); } }) .bind({ "drop": function (e) { dropHandler(e, $(this)); } }); }); }}<%@ Register Src="~/admin/widgets/assetmanager.ascx" TagPrefix="uc" TagName="AssetManager" %><uc:AssetManager runat="server" ID="Slides" /><uc:AssetManager runat="server" ID="Boxes" /><telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"> <script type="text/javascript"> //.Master file needs: function pageLoad() { loadAsync() } //Utils.js - loadAsync(), dropHandler(), dragEnterHandler(), dragLeaveHandler() function fileUploaded<%= AsyncUpload1.ClientID %>(sender, args) { alert("fileUploaded<%= AsyncUpload1.ClientID %>"); $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).hide(); $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAssets<%= AsyncUpload1.ClientID %>"); $telerik.$(".invalid.msg" + <%= AsyncUpload1.ClientID %>).html(""); sender.deleteFileInputAt(0); } function validationFailed<%= AsyncUpload1.ClientID %>(sender, args) { alert("validationFailed<%= AsyncUpload1.ClientID %>"); $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).show(); $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).html("Sorry, you are trying to upload an invalid type of file."); if ($(".filetypes").text() != "") { var types = $(".filetypes").text().replace("(", "").replace(")", ""); $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).append(" You can upload the following types of file: " + types + "."); } sender.deleteFileInputAt(0); } </script> <script type="text/javascript"> //Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; }; Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function () { return false; }; </script></telerik:RadScriptBlock><telerik:RadCodeBlock runat="server" ID="RadCodeBlock1"> <span class="msg error invalid msg<%= AsyncUpload1.ClientID %>" style="display:none;"></span></telerik:RadCodeBlock><div id="pnlDropZone" runat="server" class="dropzone dr{0}"> <h5>To upload, drop files here</h5> <p>or</p> <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" MaxFileSize="52428800" Localization-Select="Select Files" DropZones=".dropzone" /> </div>Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page) AddHandler manager.AjaxRequest, AddressOf assets_AjaxRequest manager.AjaxSettings.AddAjaxSetting(manager, AsyncUpload1) manager.AjaxSettings.AddAjaxSetting(manager, ddlMoveTo) If Not IsPostBack Then AsyncUpload1.TargetFolder = "~/Images" AsyncUpload1.OnClientFileUploaded = "fileUploaded" & AsyncUpload1.ClientID AsyncUpload1.OnClientValidationFailed = "validationFailed" & AsyncUpload1.ClientID pnlDropZone.Attributes("class") = pnlDropZone.Attributes("class").Replace("{0}", AsyncUpload1.ClientID) End IfEnd SubProtected Sub AsyncUpload1_FileUploaded(sender As Object, e As Telerik.Web.UI.FileUploadedEventArgs) Handles AsyncUpload1.FileUploaded e.File.SaveAs(HttpContext.Current.Server.MapPath("~/images/" & e.File.FileName)) 'Add to databaseEnd Sub.dropzone{ text-align:center; padding:15px; border:dashed 5px #c0c0c0;}.dropzone h5{ margin:0;}.dropzone .RadUpload{ margin:5px auto 0; text-align:center;}.dropzone .RadUpload li{ list-style:none;}.dropzone .RadUpload input.ruFakeInput{ display: none;}