This is a migrated thread and some comments may be shown as answers.

Rad editor content and event issues

5 Answers 211 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 02 Jan 2009, 03:14 PM
Hi there.
I'm trying to get the radeditor content and when I access the property from the codebehind it appears like an empty string (and its not)
Also when Im accesing to other controls on the page from the editor events the control seems to be null (wich it isn)
Any Ideas?

5 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 02 Jan 2009, 09:35 PM
Hey Julian,

Any chance you wanna post the code from your aspx and .cs/.vb file for us to see?  I use Editor a lot and know it should all work fine and dandy, so me and the rest of the folks here are more than happy to help debug the problem. :)
0
Julian
Top achievements
Rank 1
answered on 02 Jan 2009, 10:47 PM
Sure!
Here goes the webconfig file:
<?xml version="1.0"?> 
<configuration> 
    <configSections> 
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
        <section name="BlogDataService" type="OnData.Core.Blog.Services.DataService.DataServiceSection, OnData.Core.Blog" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/> 
        <section name="ClientDataService" type="OnData.Client.Services.DataService.DataServiceSection, OnData.Client.SecuritySystem" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/> 
        <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false"/> 
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> 
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                </sectionGroup> 
            </sectionGroup> 
        </sectionGroup> 
    </configSections> 
    <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="Worlds Of Discovery" logWarningsWhenNoCategoriesMatch="true"
        <listeners> 
            <add fileName="Logs/trace.log" header="----------------------------------------" footer="----------------------------------------" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="LogicalOperationStack" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="FlatFile TraceListener"/> 
            <add source="ASP.NET 2.0.50727.0" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="LogicalOperationStack" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Formatted EventLog TraceListener"/> 
        </listeners> 
        <formatters> 
            <add template="Timestamp: {timestamp}&#xA;Message: {message}&#xA;Category: {category}&#xA;Priority: {priority}&#xA;EventId: {eventid}&#xA;Severity: {severity}&#xA;Title:{title}&#xA;Machine: {machine}&#xA;Application Domain: {appDomain}&#xA;Process Id: {processId}&#xA;Process Name: {processName}&#xA;Win32 Thread Id: {win32ThreadId}&#xA;Thread Name: {threadName}&#xA;Extended Properties: {dictionary({key} - {value}&#xA;)}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Text Formatter"/> 
        </formatters> 
        <categorySources> 
            <add switchValue="All" name="Worlds Of Discovery"
                <listeners> 
                    <add name="Formatted EventLog TraceListener"/> 
                </listeners> 
            </add> 
        </categorySources> 
        <specialSources> 
            <allEvents switchValue="All" name="All Events"/> 
            <notProcessed switchValue="All" name="Unprocessed Category"/> 
            <errors switchValue="All" name="Logging Errors &amp; Warnings"
                <listeners> 
                    <add name="Formatted EventLog TraceListener"/> 
                </listeners> 
            </errors> 
        </specialSources> 
    </loggingConfiguration> 
    <exceptionHandling> 
        <exceptionPolicies> 
            <add name="LogException"
                <exceptionTypes> 
                    <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception"
                        <exceptionHandlers> 
                            <add logCategory="Worlds Of Discovery" eventId="914" severity="Error" title="ABParks Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" priority="1" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Logging Handler"/> 
                        </exceptionHandlers> 
                    </add> 
                </exceptionTypes> 
            </add> 
        </exceptionPolicies> 
    </exceptionHandling> 
    <dataConfiguration defaultDatabase="ClientProjectName"/> 
    <connectionStrings> 
        <add name="ClientProjectName" connectionString="Password=usrClientProjectName;Persist Security Info=True;User ID=usrClientProjectName;Initial Catalog=ClientProjectName;Data Source=PICASSO"/> 
    </connectionStrings> 
    <!--PROVIDERS--> 
    <BlogDataService defaultProvider="ProjectNameDataProvider"
        <providers> 
            <clear/> 
            <add name="ProjectNameDataProvider" type="OnData.Core.Blog.Providers.DataProvider.ProjectNameDataProvider, OnData.Core.Blog"/> 
        </providers> 
    </BlogDataService> 
    <ClientDataService defaultProvider="CADClientDataProvider"
        <providers> 
            <clear/> 
            <add NombrePerfil="ClientProjectName" NombreBaseDatos="ClientProjectName" name="CADClientDataProvider" type="OnData.Client.Providers.DataProvider.CADClientDataProvider, OnData.Client.SecuritySystem"/> 
        </providers> 
    </ClientDataService> 
    <SubSonicService defaultProvider="ProjectNameDataProvider" enableTrace="false" templateDirectory=""
        <providers> 
            <clear/> 
            <add name="ProjectNameDataProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="ClientProjectName" excludeTableList="BMC_*,BN_*" generatedNamespace="OnData.Client.ProjectName.DataAccess" generateODSControllers="false" includeProcedureList="BNMC_USP_*" spStartsWith="BNMC_USP_*" stripSPText="BNMC_USP_*" stripTableText="BMC_*,BN_*"/> 
        </providers> 
    </SubSonicService> 
    <!--END PROVIDERS--> 
    <appSettings> 
        <add key="ServerRole" value="DEV"/> 
        <add key="ArchivoPerfiles" value="C:\Componente_Acceso_Datos\CFNSDATOS\cfnsconfig.xml"/> 
        <add key="MaximoIntentosFallidos" value="3"/> 
    </appSettings> 
    <system.web> 
        <authentication mode="Forms"
            <forms loginUrl="~/Admin/Security/login.aspx"/> 
        </authentication> 
        <pages theme="SinTema"
            <controls> 
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            </controls> 
        </pages> 
        <httpRuntime executionTimeout="3600"/> 
        <compilation debug="true"
            <assemblies> 
                <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                <!--<add assembly="System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>--> 
      </assemblies> 
        </compilation> 
        <httpHandlers> 
            <remove verb="*" path="*.asmx"/> 
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> 
            <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> 
            <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/> 
            <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> 
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/> 
            <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> 
            <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/> 
        </httpHandlers> 
        <httpModules> 
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
        </httpModules> 
    </system.web> 
    <system.webServer> 
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules> 
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/> 
            <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
        </modules> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/> 
            <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
        </handlers> 
    </system.webServer> 
</configuration> 
 

Here goes the control code behind:
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Collections.Generic; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using System.IO; 
using OnData.Core.Blog.Objects; 
using System.Text; 
using Telerik.Web.UI; 
 
public partial class Modules_Web_Blog_EntryEdit : System.Web.UI.UserControl 
    private string _favoriteSearchUrl = string.Empty; 
    private string _myEntriesUrl = string.Empty; 
     
    public ArrayList Tags { 
        get { 
            if(ViewState["Tags"] != null) 
                return (ArrayList)ViewState["Tags"]; 
            else 
                return new ArrayList(); 
 
        } 
        set { ViewState["Tags"] = value; } 
    } 
 
    public string FavoriteSearchUrl { 
        get { return _favoriteSearchUrl; } 
        set { _favoriteSearchUrl = value; } 
    } 
 
    public string MyEntriesUrl { 
        get { return _myEntriesUrl; } 
        set { _myEntriesUrl = value; } 
    } 
 
    public Literal ModuleTitle { 
        get { return ltrModuleTitle; } 
        set { ltrModuleTitle = value; } 
    } 
 
    public Literal BlogOwnerName { 
        get { return ltBlogOwnerName; } 
        set { ltBlogOwnerName = value; } 
    } 
 
    public Entry Entry { 
        get { 
            if (ViewState["Entry"] != null) 
                return (OnData.Core.Blog.Objects.Entry)ViewState["Entry"]; 
            else 
                return new Entry(); 
        } 
        set {ViewState["Entry"] = value;} 
    } 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        {             
            if (Request.QueryString.Get("mode") != null) 
            { 
                switch (Request.QueryString.Get("mode")) 
                { 
                    default: 
                        imbEntryPublication.Visible = false
                        EntryMessage.ShowMessage("Se esperaba un parametro en la url", ModalMessageType.Error, Page.ResolveUrl("~/WEB/Home.aspx"));                         
                        break; 
                    case "new": 
                        InitializeEntry(); 
                        SetUploadPath(); 
                        break; 
                    case "edit": 
                        if (Request.QueryString.Get("entryGuid") != null) 
                        { 
                            LoadEntry(Request.QueryString.Get("entryGuid")); 
                            SetUploadPath(); 
                        } 
                        else 
                        { 
                            imbEntryPublication.Visible = false
                            EntryMessage.ShowMessage("Se esperaba un parametro en la url", ModalMessageType.Error); 
                        } 
                        break;                         
                } 
            } 
                     
        } 
    } 
 
 
    private void BindTags() { 
        grdTags.DataSource = Tags; 
        grdTags.DataBind(); 
    } 
 
    protected override void Render(HtmlTextWriter writer) 
    { 
        if (imbEntryPublication.CommandName.Equals("update")) 
            if (Entry.IsLoaded) 
                LoadDropdownListControls(); 
        base.Render(writer); 
    } 
 
    protected override void OnPreRender(EventArgs e) 
    { 
        if (!imbEntryPublication.CommandName.Equals("update")) 
            if (Entry.IsLoaded) 
                LoadNonDropdownlistControls(); 
        base.OnPreRender(e); 
    } 
 
    private void LoadEntry(string entryGuid) { 
        //TODO: Cambiar por el identity del usuario. 
        //Entry = new Entry(entryGuid, Page.User.Identity.Name); 
        Entry = new Entry(entryGuid, "03D6BF5A-0F3F-465E-9AB6-20BB94B2FDDE"); 
         
        if (!Entry.IsLoaded) 
            EntryMessage.ShowMessage("No se ha encontrado la entrada", ModalMessageType.Warning); 
        else 
        { 
            odsTags.SelectParameters["guidBlog"].DefaultValue = Entry.BlogGuid; 
            string targetUploadFolder = Request.PhysicalApplicationPath + "\\Uploads\\" + Entry.BlogGuid + "\\" + Entry.Guid; 
            string targetThumbnailUploadFolder = Request.PhysicalApplicationPath + "\\Uploads\\" + Entry.BlogGuid + "\\Thumbnails"; 
            if (!Directory.Exists(targetUploadFolder))             
                Directory.CreateDirectory(targetUploadFolder); 
 
            if (!Directory.Exists(targetThumbnailUploadFolder)) 
                Directory.CreateDirectory(targetThumbnailUploadFolder); 
        } 
    } 
 
    protected void btnNewTag_Click(object sender, ImageClickEventArgs e) 
    { 
        ArrayList tagList = Tags
        Tag newnewTag = new Tag(); 
        if (rdcmTag.SelectedItem != null) 
        {             
            newTag.Guid = rdcmTag.SelectedItem.Value; 
            newTag.OwnerGuid = Entry.BlogGuid; 
            newTag.TagText = rdcmTag.SelectedItem.Text; 
        } 
        else  
        { 
            newTag.Guid = Guid.NewGuid().ToString(); 
            newTag.TagText = rdcmTag.Text; 
            newTag.OwnerGuid = string.Empty; 
        } 
        bool found = false
        foreach(Tag currentTag in Tags){ 
            if(currentTag.Guid.Equals(newTag.Guid, StringComparison.OrdinalIgnoreCase) || currentTag.TagText.Equals(newTag.TagText, StringComparison.OrdinalIgnoreCase)) 
            { 
                found = true
                break; 
            } 
             
        } 
        if (!found) 
            tagList.Add(newTag); 
        else 
            EntryMessage.ShowMessage("El tag que intentas agregar ya se encuentra en la coleccion de tags", ModalMessageType.Forbidden); 
        Tags = tagList
        BindTags(); 
    } 
 
    protected void grdTags_RowDeleting(object sender, GridViewDeleteEventArgs e) 
    { 
        e.Cancel = true
        ArrayList tagList = Tags
        tagList.RemoveAt(e.RowIndex); 
        Tags = tagList
        BindTags(); 
        rdcmTag.DataBind(); 
    } 
 
    private void CleanTagField() { 
        rdcmTag.ClearSelection(); 
    }   
 
    public bool reEntryBody_FileUpload(object sender, string fileName) 
    {         
        int currentUploadedImages = Entry.ImageCount; 
        currentUploadedImages++; 
        if (currentUploadedImages > 4) { 
            File.Delete(fileName); 
            EntryMessage.ShowMessage("Lo sentimos, sólo puedes cargar 4 imágenes por relato. Elimina una de las imágenes ya cargadas e inténtalo de nuevo." 
                , ModalMessageType.Forbidden); 
        } 
        Entry.ImageCount = currentUploadedImages
        return true; 
    } 
 
    public bool reEntryBody_FileDelete(object sender, string fileName) 
    { 
        Entry.ImageCount--; 
        return true; 
    } 
 
    //protected void imbEntryPrevisualitation_Click(object sender, ImageClickEventArgs e) 
    //{ 
    //    ltEntryContent.Text = reEntryBody.Content; 
    //    popupMessage.Show(); 
    //} 
 
    public void InitializeEntry() {        
        Entry entry = Entry
        entry.Guid = Guid.NewGuid().ToString(); 
        //TODO: Cambiar por el identity 
        //entry.BlogGuid = Page.User.Identity.Name;         
        entry.BlogGuid = "03D6BF5A-0F3F-465E-9AB6-20BB94B2FDDE"
        odsTags.SelectParameters["guidBlog"].DefaultValue = entry.BlogGuid; 
        string targetUploadFolder = Request.PhysicalApplicationPath + "\\Uploads\\" + entry.BlogGuid + "\\" + entry.Guid; 
        string targetThumbnailUploadFolder = Request.PhysicalApplicationPath + "\\Uploads\\" + entry.BlogGuid + "\\Thumbnails"; 
         
        if (!Directory.Exists(targetUploadFolder)) 
            Directory.CreateDirectory(targetUploadFolder); 
 
        if (!Directory.Exists(targetThumbnailUploadFolder)) 
            Directory.CreateDirectory(targetThumbnailUploadFolder); 
        entry.ImageCount = 0;        
        ltrModuleTitle.Text = "Crear Relato"
        imbEntryPublication.CommandName = "new"
        Entry = entry
    } 
 
    protected void imbEntryPublication_Click(object sender, ImageClickEventArgs e) 
    { 
        StringBuilder thumbnailPath = new StringBuilder(); 
        ArrayList newnewTags = new ArrayList(); 
        Entry entry = Entry
        string fileExtension = string.Empty; 
        bool uploaded = false
        foreach(UploadedFile validFile in ruEntryThubnailUpload.UploadedFiles){ 
            fileExtension = validFile.GetExtension(); 
            validFile.SaveAs(Path.Combine(Server.MapPath(ruEntryThubnailUpload.TargetFolder), 
                Entry.Guid + '.' + validFile.GetExtension()), true); 
        } 
        thumbnailPath.Append(GetSiteRoot()); 
        thumbnailPath.Append("/"); 
        thumbnailPath.Append(ruEntryThubnailUpload.TargetFolder); 
        thumbnailPath.Append(Entry.Guid); 
        thumbnailPath.Append(fileExtension); 
        switch (imbEntryPublication.CommandName) { 
            case "new": 
            default: 
                if (!uploaded) 
                { 
                    EntryMessage.ShowMessage("Verifica que ingresaste una imagen para tu entrada y que además<br/>, el tamaño de la imagen que intentas cargar sea inferior a 512 Kb", ModalMessageType.Error); 
                    return; 
 
                } 
                entry.CategoryId = Convert.ToInt32(ddlEntryCategoryID.SelectedValue); 
                entry.SkinId = entrySkinMenu.SelectedSkin; 
                entry.Title = txtbEntryTitle.Text;                
                entry.Image = thumbnailPath.ToString(); 
                entry.Abstract = txtbEntryAbstract.Text; 
                entry.Content = reEntryBody.Content; 
                entry.PublicationDate = DateTime.Now; 
                entry.StateId = Convert.ToInt32(ddlEntryDepartament.SelectedValue); 
                entry.ImageCount = 4
                entry.StatusId = 2
                entry.Save(); 
 
            break; 
            case "update": 
                entry.CategoryId = Convert.ToInt32(ddlEntryCategoryID.SelectedValue); 
                entry.SkinId = entrySkinMenu.SelectedSkin; 
                entry.Title = txtbEntryTitle.Text; 
                if (uploaded) 
                    entry.Image = thumbnailPath.ToString(); 
                entry.Abstract = txtbEntryAbstract.Text; 
                entry.Content = reEntryBody.Content; 
                entry.StateId = Convert.ToInt32(ddlEntryDepartament.SelectedValue); 
                entry.ImageCount = 4
                entry.StatusId = 2
                entry.UpdateDate = DateTime.Now; 
                entry.Save(); 
                break;             
        } 
 
        foreach (Tag currentTag in Tags) 
        { 
            if (currentTag.OwnerGuid == string.Empty) 
            { 
                currentTag.OwnerGuid = Entry.BlogGuid; 
                newTags.Add(currentTag); 
            } 
        } 
 
        entry.SaveTags(newTags); 
        entry.MarkEntry(Tags); 
        
    } 
 
    private void LoadNonDropdownlistControls() { 
        ltrModuleTitle.Text = "Editar Relato"
        txtbEntryTitle.Text = Entry.Title; 
        txtbEntryAbstract.Text = Entry.Abstract; 
        entrySkinMenu.SelectedSkin = Entry.SkinId; 
        TagTags = Tag.GetEntryTagCollection(Entry.Guid); 
        BindTags(); 
        reEntryBody.Content = Entry.Content; 
        imbEntryPublication.CommandName = "update"
    } 
 
    private void LoadDropdownListControls() { 
        ddlEntryCategoryID.Items.FindByValue(Entry.CategoryId.ToString()).Selected = true
        ddlEntryDepartament.Items.FindByValue(Entry.StateId.ToString()).Selected = true
    } 
 
    private string GetSiteRoot() 
    { 
        string Port = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT"]; 
        if (Port == null || Port == "80" || Port == "443") 
            Port = ""
        else 
            Port = ":" + Port; 
 
        string Protocol = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT_SECURE"]; 
        if (Protocol == null || Protocol == "0") 
            Protocol = "http://"
        else 
            Protocol = "https://"
 
        string appPath = System.Web.HttpContext.Current.Request.ApplicationPath; 
        if (appPath == "/") 
            appPath = ""
 
        string sOut = Protocol + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + Port + appPath; 
        return sOut; 
    } 
 
    private void SetUploadPath() { 
        reEntryBody.ImageManager.DeletePaths = new string[1]; 
        reEntryBody.ImageManager.UploadPaths = new string[1]; 
        reEntryBody.ImageManager.ViewPaths = new string[1]; 
        reEntryBody.ImageManager.DeletePaths[0] += "/" + Entry.BlogGuid + "/" + Entry.Guid; 
        reEntryBody.ImageManager.UploadPaths[0] = reEntryBody.ImageManager.DeletePaths[0]; 
        reEntryBody.ImageManager.ViewPaths[0] = reEntryBody.ImageManager.DeletePaths[0]; 
        ruEntryThubnailUpload.TargetFolder += "/" + Entry.BlogGuid + "/Thumbnails"; 
    } 
 

Here goes the code for the control's aspx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="EntryEdit.ascx.cs" Inherits="Modules_Web_Blog_EntryEdit" %> 
<%@ Register Src="SkinMenu.ascx" TagName="SkinMenu" TagPrefix="uc1" %> 
<%@ Register Src="../../Common/ModalMessage.ascx" TagName="ModalMessage" TagPrefix="uc2" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<style type="text/css" runat="server"
            .ruButton {                
                color: #fff; 
                border: 0;height: 21px; 
                font: bold 11px arial,verdana,sans-serif;                 
                width:68px; 
                background:url('<%= Page.ResolveUrl("~/Web/imagenes/btn_examinar.png") %>') no-repeat; 
                 
             } 
</style> 
<table class="fontramablanca" cellspacing="0" cellpadding="5" border="0" width="730"
    <tbody> 
        <tr> 
            <td class="fontramablanca"
            </td> 
        </tr> 
        <tr> 
            <td class="fontramanaranja"
                <table cellspacing="0" cellpadding="3" border="0" width="723"
                    <tbody> 
                        <tr> 
                            <td width="440" class="stilo1"
                                <asp:Literal runat="server" ID="ltrModuleTitle"/> 
                            </td> 
                            <td width="277"
                                <div align="right"
                                <%--TODO :Meter lo botones de busqueda--%> 
                                <asp:HyperLink ID="imbYourEntries" runat="Server" ImageUrl="~/WEB/imagenes/btn_tusRelatosBig.png" /> 
                                <asp:HyperLink ID="imbYourFavorites" runat="server" ImageUrl="~/WEB/imagenes/favoritosBig.png" />                                 
                            </td> 
                        </tr> 
                    </tbody> 
                 </table>                 
            </td> 
        </tr> 
        <tr> 
            <td class="fontramablanca"
                <table border="0" width="720"
                    <tbody> 
                        <tr> 
                            <td width="725"
                                <span class="stilo2"
                                    <br/><strong><asp:Literal runat="server" ID="ltBlogOwnerName" /> 
                                    </strong>, cuéntanos sobre aquel lugar sorprendente y poco conocido 
                                    de tu región.</span><br/> 
                                <span class="stilo3">*(Todos los campos son necesarios para publicar tu relato)</span><br/> 
                                <br/> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <table border="0" width="715"
                                    <tbody> 
                                        <tr> 
                                            <td> 
                                                <br/> 
                                                <span class="stilo2">1. *Para empezar elige un título para tu relato.</span></td
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <label> 
                                                    <asp:TextBox runat="server" ID="txtbEntryTitle" MaxLength="100" CssClass="campos_formularios"/> 
                                                    <%--TODO:Eliminar<input type="text" class="campos_formularios" id="titulo" name="titulo"/>--%> 
                                                    <img height="19" align="absmiddle" width="20" alt="alerta" src="imagenes/Ico_AlertaPequeno.png"/> 
                                                    <span class="stilo3">Debes ingresar un título para tu relato</span></label></td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                            </td> 
                        </tr> 
                    </tbody> 
                </table> 
            </td> 
        </tr> 
        <tr>         
            <td class="fontramanaranja" valign="top"
                <table width="720" border="0" cellpadding="0"
                    <tbody> 
                        <tr> 
                            <td class="stilo2" width="706" height="16"
                                2. *Escribe una muy breve descripción sobre el relato que deseas publicar y sube 
                                una foto que describa el lugar del que hablarás, ten en cuenta que no debe pesar 
                                más de 512K.</td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <table width="715" border="0"
                                    <tbody> 
                                        <tr> 
                                            <td width="709"
                                                <label> 
                                                    <asp:TextBox runat="server" TextMode="MultiLine" Columns="45" Rows="5" CssClass="campos_formularios" ID="txtbEntryAbstract"/>                                                     
                                                </label> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td valign="middle"
                                               <telerik:RadUpload 
                                                    ID="ruEntryThubnailUpload" 
                                                    runat="server" 
                                                    Skin="Default" 
                                                    ControlObjectsVisibility="None" 
                                                    EnableFileInputSkinning="true" 
                                                    Language="es-CO"                                                     
                                                    InputSize="50" 
                                                    EnableEmbeddedSkins="false" 
                                                    ReadOnlyFileInputs="true" 
                                                    ToolTip="Cargar Imagen de entradilla" 
                                                    MaxFileSize="524288" 
                                                    OverwriteExistingFiles="true" 
                                                    TargetFolder="~/Uploads" 
                                                    />                                              
                                            </td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                                <label> 
                                </label> 
                            </td> 
                        </tr> 
                    </tbody> 
                </table> 
            </td>                     
        </tr>         
        <tr>        
            <td height="18"
                <table width="720" border="0" cellpadding="0"
                    <tbody> 
                        <tr> 
                            <td class="stilo2" width="706"
                            3. *Ahora, elige la plantilla que mejor represente el lugar del que escribirás. 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <label>                                                 
                                    <uc1:SkinMenu ID="entrySkinMenu" runat="server" /> 
                                </label> 
                            </td> 
                        </tr> 
                    </tbody> 
                </table> 
            </td>                                
        </tr> 
        <tr>         
            <td class="fontramanaranja"
                <table width="720" border="0" cellpadding="0"
                    <tbody> 
                        <tr> 
                            <td class="stilo2" width="706"
                                4. Por Ãºltimo completa todos los campos para publicar tu relato. 
                            </td> 
                        </tr> 
                        <tr> 
                            <td valign="top"
                                <table width="706" border="0" cellpadding="0"
                                    <tbody> 
                                        <tr> 
                                            <td> 
                                                <table width="670" border="0"
                                                    <tbody><tr
                                                        <td class="stilo2"
                                                            *Categoría</td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            <label> 
                                                                <asp:DropDownList runat="server" ID="ddlEntryCategoryID" CssClass="campos_formularios" AppendDataBoundItems="True" DataSourceID="odsCategory" DataTextField="DESCRIPCION_CATEGORIA" DataValueField="ID"
                                                                    <asp:ListItem Value="0">[Seleccione]</asp:ListItem> 
                                                                </asp:DropDownList> 
                                                                <asp:ObjectDataSource ID="odsCategory" runat="server" SelectMethod="GetCategories" TypeName="OnData.Core.Blog.Controllers.ReferentialController"></asp:ObjectDataSource>                                                                 
                                                            </label> 
                                                        </td> 
                                                    </tr> 
                                                </tbody></table
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <table width="670" border="0"
                                                    <tbody> 
                                                        <tr> 
                                                            <td class="stilo2"
                                                                *Departamento</td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <label> 
                                                                    <asp:DropDownList runat="server" ID="ddlEntryDepartament" CssClass="campos_formularios" AppendDataBoundItems="True" DataSourceID="odsDepartamentos" DataTextField="NOMBRE_DEPARTAMENTO" DataValueField="ID"
                                                                    <asp:ListItem Value="0">[Seleccione]</asp:ListItem> 
                                                                </asp:DropDownList> 
                                                                    <asp:ObjectDataSource ID="odsDepartamentos" runat="server" SelectMethod="GetDepartaments" TypeName="OnData.Core.Blog.Controllers.ReferentialController"></asp:ObjectDataSource> 
                                                                </label> 
                                                            </td> 
                                                        </tr> 
                                                    </tbody> 
                                                </table> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <table width="670" border="0"
                                                    <tbody> 
                                                        <tr> 
                                                            <td class="stilo2"
                                                                *Tags (Escribe las palabras claves que describan tu relato separadas por comas)</td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td> 
                                                                <asp:GridView runat="server" ID="grdTags" BorderWidth="0px" OnRowDeleting="grdTags_RowDeleting" AutoGenerateColumns="False" GridLines="None"
                                                                    <Columns> 
                                                                        <asp:CommandField ButtonType="Image" DeleteImageUrl="~/WEB/imagenes/BtnEliminarTag.png" 
                                                                            ShowCancelButton="False" ShowDeleteButton="True" /> 
                                                                        <asp:BoundField DataField="TagText"
                                                                            <ControlStyle CssClass="stilo2"/> 
                                                                        </asp:BoundField> 
                                                                    </Columns> 
                                                                    <EmptyDataTemplate> 
                                                                        <div class="stilo2"
                                                                            Este relato no esta taggeado. 
                                                                        </div> 
                                                                    </EmptyDataTemplate> 
                                                                    <RowStyle CssClass="stilo2" /> 
                                                                </asp:GridView> 
                                                                <table width="666" border="0"
                                                                    <tbody> 
                                                                        <tr> 
                                                                            <td valign="top" width="302"
                                                                                <table width="654" border="0"
                                                                                    <tbody>                                                                                         
                                                                                        <tr> 
                                                                                            <td> 
                                                                                                <label>                                                                                                     
                                                                                                    <telerik:RadComboBox ID="rdcmTag" runat="server" Skin="Sunset" DataSourceID="odsTags" DataTextField="TAG" 
                                                                                                        DataValueField="GUID"                                                                                                         
                                                                                                        MarkFirstMatch="true" 
                                                                                                        AllowCustomText ="true" 
                                                                                                        Filter="StartsWith"                                        
                                                                                                        > 
                                                                                                        <CollapseAnimation Duration="200" Type="OutQuint" />                                                                                                         
                                                                                                    </telerik:RadComboBox> 
                                                                                                    <asp:ObjectDataSource ID="odsTags" runat="server" SelectMethod="GetUserTagCollection" TypeName="OnData.Core.Blog.Objects.Tag"
                                                                                                        <SelectParameters> 
                                                                                                            <asp:Parameter Name="guidBlog" Type="String" ConvertEmptyStringToNull="false" />                                                                                                             
                                                                                                        </SelectParameters> 
                                                                                                    </asp:ObjectDataSource> 
                                                                                                    <asp:ImageButton ID = "btnNewTag" Width="96" Height="22" ImageUrl="~/WEB/imagenes/btn_AgregarTags.png" runat="server" OnClick="btnNewTag_Click" AlternateText="Agregar Tags" ImageAlign="AbsMiddle" />                                                                                                         
                                                                                                </label> 
                                                                                            </td> 
                                                                                        </tr> 
                                                                                    </tbody> 
                                                                                </table> 
                                                                            </td> 
                                                                        </tr> 
                                                                    </tbody> 
                                                                </table> 
                                                                <label> 
                                                                </label> 
                                                            </td> 
                                                        </tr> 
                                                    </tbody> 
                                                </table> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <table width="690" border="0"
                                                    <tbody> 
                                                        <tr> 
                                                            <td class="stilo2"
                                                                *Relato 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td>                                                                 
                                                               <telerik:RadEditor                                                                 
                                                                    ID="reEntryBody" 
                                                                    runat="server" 
                                                                    EditModes="All" 
                                                                    Height="325px" 
                                                                    ToolbarMode="Default" 
                                                                    EnableResize="true"                                                                     
                                                                    Skin="Office2007" Language="es-CO"                                                                     
                                                                    OnFileUpload="reEntryBody_FileUpload" 
                                                                    OnFileDelete="reEntryBody_FileDelete"
                                                                    <ImageManager UploadPaths="~/Uploads" ViewPaths="~/Uploads" DeletePaths="~/Uploads" MaxUploadFileSize="524288"/>                                                                     
                                                                     
                                                                        <CssFiles> 
                                                                            <telerik:EditorCssFile Value="~/WEB/Css/estilosSinBackGround.css" /> 
                                                                        </CssFiles> 
                                                                        <SpellCheckSettings DictionaryLanguage="es-CO"/>                                                                         
                                                                </telerik:RadEditor> 
                                                            </td> 
                                                        </tr> 
                                                    </tbody> 
                                                </table> 
                                            </td> 
                                        </tr> 
                                    </tbody> 
                                </table> 
                                <label> 
                                </label> 
                            </td> 
                        </tr> 
                    </tbody> 
                </table> 
            </td>                     
        </tr> 
        <tr> 
            <td> 
                <table width="720" border="0" cellpadding="0"
                    <tr> 
                        <td height="25"
                            <div align="center"
                                <img src="~/WEB/imagenes/btn_visualizar.png" alt="visualizar" width="75" height="20" border="0" onclick="ShowPreview();" runat="server" id="imbEntryPrevisualitation" style="cursor:pointer; vertical-align:middle;"/>      
                                <%--<asp:ImageButton ID="imbEntryPrevisualitation" runat="server" ImageUrl="~/WEB/imagenes/btn_visualizar.png" AlternateText="Visualizar" OnClientClick="ShowPreview();"/>--%> 
                                <asp:ImageButton ID="imbEntryPublication" runat="server" ImageUrl="~/WEB/imagenes/btn_publicar.png" AlternateText="Publicar" ImageAlign="AbsMiddle" OnClick="imbEntryPublication_Click"/>                                 
                            </div> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
             
        </tr>         
    </tbody> 
</table> 
<div style="display: none"
    <asp:Button ID="btnMessageHidden" runat="server" /></div
<Ajax:ModalPopupExtender ID="popupMessage" runat="server" PopupControlID="panelMessage" 
    PopupDragHandleControlID="" BehaviorID="previewMessagePopUpBehavior" RepositionMode="RepositionOnWindowResize" 
    BackgroundCssClass="modalBackground" DropShadow="false" TargetControlID="btnMessageHidden" > 
</Ajax:ModalPopupExtender> 
<asp:Panel ID="panelMessage" CssClass="modalPopup" Style="display: none" runat="Server" 
    Width="800" Height="550"
    <div class="fontramablanca"
        <span> 
            <span class="tituloRelato"
            <asp:Image ID="imgIcon" SkinID="iconoCategoria" runat="server" ImageAlign="AbsMiddle" /> 
            <span id="textoTituloRelato"></span> </span></span
        <div id="scrollAmpliacion"
            <div class="contentRelato"
                <div id="divEntryContent"
                </div> 
                <asp:Literal ID="ltEntryContent" runat="server"></asp:Literal> 
            </div> 
        </div> 
        <div class="BarraBotones"
            <img src="~/WEB/imagenes/btn_cerrar.png" alt="visualizar" border="0" onclick="CerrarPopDetalle();" runat="server" id="imbEntryPreviewClose" style="cursor:pointer" width="55" height="19"/>             
        </div> 
    </div> 
</asp:Panel> 
<uc2:ModalMessage ID="EntryMessage" runat="server" /> 
<script type="text/javascript"
function CerrarPopDetalle() 
    var PopExtender = $find('previewMessagePopUpBehavior'); 
    PopExtender.hide(); 
 
function ShowPreview(){ 
    var PopExtender = $find('previewMessagePopUpBehavior');     
    var rdEditor = $find('<%=reEntryBody.ClientID %>') 
    var divEntryPreview = document.getElementById('divEntryContent') 
    var entryTile = document.getElementById('<%=txtbEntryTitle.ClientID %>') 
    var entryPreviewTitle = document.getElementById('textoTituloRelato') 
     
    divEntryPreview.innerHTML =  rdEditor.get_html();    
    entryPreviewTitle.innerHTML = entryTile.value; 
    PopExtender.show(); 
</script> 

Here goes the code for the page that has the control (no codebehind needed)
<%@ Page Language="C#" MasterPageFile="~/WEB/SiteMaster.master" AutoEventWireup="true" 
    CodeFile="Entry.aspx.cs" Inherits="WEB_Entry" %> 
<%@ Register Src="../Modules/Web/Panels/FavoritesPanel.ascx" TagName="FavoritesPanel" 
    TagPrefix="uc2" %> 
<%@ Register Src="../Modules/Web/Blog/EntryEdit.ascx" TagName="EntryEdit" TagPrefix="uc1" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="contenidoPrincipal" runat="server"
    <div id="conte_sitio"
        <div id="ppal"
            <div id="barra_navegacion">                   
            </div> 
            <div id="fondo_contenido"
                <asp:ScriptManager ID="scmManager" runat="server" />  
                <asp:UpdatePanel ID="UpdatePanel1" runat="server"
                    <ContentTemplate> 
                        <uc1:EntryEdit ID="EntryEdit" runat="server"/> 
                    </ContentTemplate>                     
                </asp:UpdatePanel>  
            </div> 
        </div> 
    </div> 
    <div id="contenedor_banners">         
        <div id="contenidobnn_ultimosrelatos"
            <uc2:FavoritesPanel ID="FavoritesPanel" runat="server" />             
        </div> 
    </div> 
    </asp:Content> 
 

Here goes the code for the master page (no code behind for this one):
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SiteMaster.master.cs" Inherits="WEB_SiteMaster" %> 
<%@ Register Src="../Modules/Web/Blog/SkinMenu.ascx" TagName="SkinMenu" TagPrefix="uc2" %> 
<%@ Register Src="../Modules/Web/Common/SiteMenu.ascx" TagName="SiteMenu" TagPrefix="uc1" %> 
<!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"
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    <title>.::Caracol y Bancolombia Más Cerca::.</title> 
 
    <script type="text/javascript"
<!-- 
function MM_swapImgRestore() { //v3.0 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) xx.src=x.oSrc; 
function MM_preloadImages() { //v3.0 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 
 
function MM_findObj(n, d) { //v4.01 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
    d=parent.frames[n.substring(p+1)].document; nn=n.substring(0,p);} 
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
  if(!x && d.getElementById) x=d.getElementById(n); return x; 
 
function MM_swapImage() { //v3.0 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) xx.oSrc=x.src; x.src=a[i+2];} 
//--> 
</script> 
 
    <script defer type="text/javascript" src="Js/png.js"></script> 
 
    <link href="Css/estilosGenerales.css" rel="stylesheet" type="text/css" /> 
    <link href="Css/estilosBanners.css" rel="stylesheet" type="text/css" /> 
</head> 
<body onload="MM_preloadImages('imagenes/bhome2.jpg','imagenes/bcomunidad2.jpg')"
    <form id="form1" runat="server"
        <!--Todos los div deven ir contenidos dentro de conte_sitio y ppal--> 
        <div id="conte_sitio"
            <div id="ppal"
                <!--Menu del sitio--> 
                <uc1:SiteMenu ID="SiteMenu1" runat="server" /> 
                <asp:ContentPlaceHolder ID="contenidoPrincipal" runat="server"
                </asp:ContentPlaceHolder> 
                <!--contenedor para los banners--> 
                <div id="contenedor_banners"
                    <asp:ContentPlaceHolder ID="contenidoPaneles" runat="server"
                    </asp:ContentPlaceHolder> 
                </div> 
            </div> 
            <!--cierra el div principal--> 
        </div> 
        <!--cierra contenedor del sitio--> 
    </form> 
</body> 
</html> 


So here are my issues:
First I'm trying to control how many images are uploaded by entry... but on the Upload, delete events of the editor's ImageManager it says that the viewstate (which I'm using to store the ammount of images) is empy (null would be a rough term).
I thougth it was a issue with the viewstate and the control so I changed my approach and ty to store it on a hiddenfield... but when I try to acces the hidden from the event it says that the hidden (or any other control ) is null.

You see there is a javascript code at the end of the entry control?
Well it works nicelly on firefox, but on internet explorer I have to do something that fires a postback in order to fire the javascript function later (for example, If a tag the entry and then press the preview image it works). I was trying to do this from a imagebutton and load the editor's content into a literal control which was going to be displayed on the popupextender, but the radeditor content was returning an empty string.

Well I think thats pretty much of it...

I'm not a pro developer so dont expect pro code here :P.
Thanks for the help, and happy new year
0
Julian
Top achievements
Rank 1
answered on 02 Jan 2009, 11:10 PM
Btw I'm ussing Vista, and visual studio 2005
But it's not a vista issue, I tried to run on a development server debugging from an XP OS bassed machine and the issue was still there
0
Julian
Top achievements
Rank 1
answered on 03 Jan 2009, 01:37 AM
oh yeah and the latest build of rad controls 20081125
0
Nikolay Raykov
Telerik team
answered on 06 Jan 2009, 12:01 PM
Hi Julian,

The reason you cannot persist your objects in the ViewState is because the postback to the server comes not from the page where RadEditor resides. The dialogs of the editor load different pages and when you make a postback (click on the upload button in your case) you work in a different context. That said to call your event handlers a new instance of the page where your editor resides is created and the event handlers need to be public.

What you could do in your case is to use some other storage medium to persist your objects, i.e. the Session, Application objects or a database.

As for the other problem that you cannot show the popup - it works fine on my side. Please find the attached screenshot where you can see the popup. It lacks styling but a have highlighted it so you can see it.

Sincerely yours,
Nikolay Raykov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Julian
Top achievements
Rank 1
Answers by
Serrin
Top achievements
Rank 1
Julian
Top achievements
Rank 1
Nikolay Raykov
Telerik team
Share this question
or