or
| <telerik:RadUpload ID="ruImage" runat="server" InitialFileInputsCount="1" ControlObjectsVisibility="None" AllowedMimeTypes="image/bmp,image/gif,image/jpeg,image/pjpeg,image/tiff,image/x-png" /> |
| if (ruImage.UploadedFiles.Count > 0) |
| { |
| AppImages oImage = null; |
| foreach (UploadedFile theFile in ruImage.UploadedFiles) |
| { |
| string fileName = theFile.FileName; |
| fileName = fileName.Substring(fileName.LastIndexOf(@"\")).Replace(@"\", ""); |
| byte[] myBytes = new byte[theFile.ContentLength]; |
| theFile.InputStream.Read(myBytes, 0, theFile.ContentLength); |
| oImage = new AppImages(); |
| oImage.AppId = appId; |
| oImage.FileName = fileName; |
| oImage.FileSize = theFile.ContentLength; |
| oImage.FileType = theFile.ContentType; |
| oImage.Attachment = myBytes; |
| oImage.LastUpdatedBy = UserName; |
| oImage.Insert(); |
| oImage = null; |
| } |
| } |
| Parameter is not valid. |
| Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. |
| Exception Details: System.ArgumentException: Parameter is not valid. |
| Source Error: |
| An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
| Stack Trace: |
| [ArgumentException: Parameter is not valid.] |
| System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +430 |
| System.Drawing.Image.FromStream(Stream stream) +14 |
| Telerik.Web.UI.ImageFilterHelper.CreateImgFromBytes(Byte[] image) +77 |
| [ArgumentException: The provided binary data may not be valid image or may contains unknown header] |
| Telerik.Web.UI.ImageFilterHelper.CreateImgFromBytes(Byte[] image) +219 |
| Telerik.Web.UI.RadBinaryImage.AutoAdjustImageElementSize(Byte[] dataValue) +26 |
| Telerik.Web.UI.RadBinaryImage.ProcessImageData() +106 |
| Telerik.Web.UI.RadBinaryImage.OnPreRender(EventArgs e) +27 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +108 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Control.PreRenderRecursiveInternal() +224 |
| System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394 |
| -------------------------------------------------------------------------------- |
| Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 |
| <%@ Page Language="C#" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!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 id="Head1" runat="server"> |
| <title>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager" runat="server"></asp:ScriptManager> |
| <telerik:RadEditor runat="server" ID="RadEditor" Width="100%" |
| Height="350px" EditModes="Design" Enabled="true"> |
| <Content> |
| <p>Some text</p> |
| <textarea rows="5" cols="40">Text area text</textarea> |
| <input type="button" onclick="alert('button clicked');" value="Press Me" /> |
| <input type="checkbox" /> |
| <p>More text</p> |
| </Content> |
| </telerik:RadEditor> |
| <input type="button" onclick="alert($find('<%=RadEditor.ClientID%>').get_html(true))" value="Show HTML" /> |
| </form> |
| </body> |
| </html> |
| //this was generated by the scheduler, and I coped it to here from the DB |
| string ruleString = "DTSTART:20100504T000000Z DTEND:20100505T000000Z RRULE:FREQ=WEEKLY;COUNT=2;INTERVAL=1;BYDAY=TU"; |
| RecurrenceRule rrule; |
| RecurrenceRule.TryParse(ruleString, out rrule); |
| if (rrule == null) |
| { |
| return; |
| } |
| DateTime test; |
| foreach (DateTime occurrence in rrule.Occurrences) |
| { |
| //do something with each date... |
| } |
| Error: 'this.ColGroup.Cols' is null or not an object |
| Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click |
| RadGrid1.MasterTableView.ExportToExcel() |
| End Sub |
.rcbArrowCellRight


Here's how to spell check a textbox in a Detailview:
| <script type="text/javascript"> |
| function startSpell() { |
| var sources = document.getElementById('<%=DetailsView1.FindControl("CommentTextBox").ClientID %>'); |
| var spell = $find("<%=RadSpell1.ClientID%>"); |
| spell.set_textSource(new Telerik.Web.UI.Spell.HtmlElementTextSource(sources)); |
| spell.startSpellCheck(); |
| } |
| </script> |
| <telerik:RadSpell ID="RadSpell1" Runat="server" ControlToCheck="DetailsView1" |
| ButtonType="None" Height="28px" /> |
| <input type="button" onclick="startSpell();" value="Check all"/> |
| <telerik:RadEditor ID="txtContent" runat="server" |
| Width="100%" |
| Height="650px" |
| ImageManager-UploadPaths="~/img/" |
| ImageManager-ViewPaths="~/img/" |
| ImageManager-DeletePaths="~/img/" |
| ImageManager-EnableImageEditor="True" |
| ImageManager-MaxUploadFileSize="2097152"> |
| </telerik:RadEditor> |