C# - Trying To Access Telerik RadEditor Controls In Master Page's Code Behind As Follows... Giving Error

Nov 3, 2010

foreach (Control control in ContentPlaceHolder1.Controls)
{
if(typeof(Control).Equals(Telerik.Web.UI.RadEditor))
{
label1.Visible = true; label1.Text = "dhchk";
// control.CssFiles.Add("~/styles/myStyle.css");
}
}

Error;-

'Telerik.Web.UI.RadEditor' is a 'type', which is not valid in the given context

Also, is this the correct way to add CSS class to radEditor controls ??

control.CssFiles.Add("~/styles/myStyle.css");

I actually wanna add 3-4 customized classes..how to do that?

also I was wondering if I can add some javascript or something in my Master page that will detect the ALL the radEditor controls and set their css classes ? don't know much of Javascript..how can that be made possible? how do I go about that? but first I want css classes to be set in code behind..what's wrong with the code?

[EDIT]

@Geek..I tried calling like this..is it correct?

Control c = new Control();
DoSomething(c);

now its giving this error in the method:-

The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?)

[EDIT]

I do have this namespace added "using System.Web.UI.WebControls;" why this error ??

View 1 Replies


Similar Messages:

C# - Accessing RadEditor Control From Master Page's Code Behind / Its Not Finding Any RadEditor Control

Nov 3, 2010

Its not executing statements in if block in my method

Master Page:-

page load event:-
Control c = new Control();
DoSomething(c);
My method:-
protected void DoSomething(Control control)(
{
foreach (Control c in control.Controls)
{
if(typeof(c).Equals(Telerik.Web.UI.RadEditor))
{
Telerik.Web.UI.RadEditor rad = c as Telerik.Web.UI.RadEditor;
label1.Visible = true; label1.Text = "dhchk";
rad.CssFiles.Add("~/styles/myStyle.css");
rad.CssFiles.Add("~/styles/myStyle2.css");
rad.CssFiles.Add("~/styles/myStyle3.css");
}
else
{
DoSomething(c);
}
}
}
my content page:-
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadEditor ID="Editor1" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins=false runat="server">
</telerik:RadEditor>
<telerik:RadEditor ID="Editor2" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins=false runat="server">
</telerik:RadEditor>

[EDIT] ok when debugging..I rt clicked "c" and then Quick watch...it says "The name 'c' does not exist in the current context" (?!?!) how so ?

View 4 Replies

RadEditor Display (LI) / Using Telerik RadEditor With IE

Feb 16, 2010

I have an issue using Telerik RadEditor with IE (not Firefox, not Chrome and not Safari).
I think that i have a conflicting css style but i have no idea of wich one (tryed to delete most of the styles). I also tryed to add a ContentEditorArea.css.

How RadEditor displays in IE8 (not very different in IE7) :
http://www.skalae.fr/radeditor.jpg

View 2 Replies

C# - Telerik Radeditor / How To Set The Value For The Skin

Nov 8, 2010

In the Telerik.Web.UI.xml file I found this entry

<member name="P:Telerik.Web.UI.RadDataBoundControl.Skin">
<summary>Gets or sets the skin name for the control user interface.</summary>
<value>A string containing the skin name for the control user interface. The default is string.Empty.</value>
<remarks>
<para>
If this property is not set, the control will render using the skin named "Default".
If EnableEmbeddedSkins is set to false, the control will not render skin.
</para>
</remarks>
</member>

that says RadControls are using skin named Default..Now what if I want it to be not default ..what if I want it to be some CustomSkin to be rendered and not default skin?? Where do I need to set the value for the skin I wanna use? I don't know much of XML..so asking

Whats this xml file for anyway? Only describing stuff? What IS the purpose of this xml file??

[EDIT]

Tried setting Skin globally in webconfig.xml as mentioned in telerik's website as follows:-

<add key="Telerik.EnableEmbeddedSkins" value="true" />
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="true" />
<add key="Telerik.RadEditor.Skin" value="CustomSkin" />

This is not making any diff! is using default file only.

View 2 Replies

C# - Customizing Telerik RadEditor Skin

Oct 29, 2010

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<link href="Skins/CustomSkin/Editor.Default.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadEditor ToolbarMode="Default"
ID="editor1" runat="server" EnableEmbeddedSkins="false" Skin="CustomSkin">
</telerik:RadEditor>
</asp:Content>

RADEditor on my page was inheriting Master Page's CSS properties so followed this tutorial to create custom skin..now what I did was...I simply copied the Folder named "Default" under Skins folder and renamed it to "CustomSkin" and added it like in the code above ..thot it would work but it didn't coz now I don't see border on my RADEditor...why is that ? Also it is STILL inheriting properties from Master page's CSS file :(

I didn't change name of any of the CSS files inside "CustomSkin" folder...Also when I added the following inside "telerik:RadEditor"...still problem persisting..

<CssFiles>
<telerik:EditorCssFile Value="~/Skins/CustomSkin/Editor.Default.css" />
<telerik:EditorCssFile Value="~/Skins/CustomSkin/Window.Default.css" />
<telerik:EditorCssFile Value="~/Skins/CustomSkin/ToolBar.Default.css" />
</CssFiles>

View 1 Replies

Web Forms :: How To Access A Method In A Master Page Code-Behind From Another Master Page Code-Behind

Nov 29, 2010

I have two master pages in my application(Suppose Master Page A and Master Page B). I have written a server side method in Master Page A.

How to access this method from code behind of Master Page B?

View 2 Replies

Telerik Radeditor CSS / How To Get The Changes To Reflect Through The Default File Only

Oct 28, 2010

<telerik:RadEditor ToolbarMode="Default"
ID="editor1" runat="server" EnableEmbeddedBaseStylesheet="true">
</telerik:RadEditor>

The editor's using Default skin..when I made changes to Editor.Default.CSS file...they didn't reflect on my page..but when I type the following I can see the changes:-

<link href="Skins/Default/Editor.Default.css" rel="stylesheet" type="text/css" />
<link href="Skins/Default/Window.Default.css" rel="stylesheet" type="text/css" />

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadEditor ToolbarMode="Default"
ID="editor1" Skin="Default" runat="server" EnableEmbeddedSkins="true">
</telerik:RadEditor>

Do I HAVE to create a custom Skin file for the changes to reflect ??I dont wanna coz the editor has been used in many files and now linking new custom CSS file in each and every aspx file will be such a pain.. I just want this to be added in the Skin:-

body
{
background-image:none;
background-color:White;
}

What this does is that it makes the background color of the content area white..earlier the content area of the Editor was inheriting background-image property of the Master Page's body tag...ohh and another funny issue is that the Font styles too are inheriting Master Page's properties only..like Heading 2 in the Editor's drop down list has got a background color when I want it to be simple..

So is making custom skin css file the only solution ..How do I get the changes to reflect thru the Default css file only ? I dont wanna create custom class..why didn't the changes reflect ?

View 2 Replies

C# - How To Find Out Which Skin Telerik's Radeditor Is Using By Default

Oct 29, 2010

In firebug under "Style" its showing the css file as follows when I hover mouse over RadEditor

"http://localhost/myWeb/WebResource.axd?d=WSPnt1ffDvgb4bj2Ii5nA4MecfZdsnZ0wvgLy3HVcihYTy2nMTq7iIu8RlAb7ZMF61e07jisMUNhQZabIxK2kyuxNpeCFqhE3cgnDSm1-Pc1&t=634237829795625000"

In telerik:RadEditor tag ..I haven't specified any property such as Skin=Skin1 or whatever..so its using some default skin...In the Skins folder..there's this folder named "Default" that's got images and css files...Is "Default" what it's using ??? now when I change something in the Default skin's CSS file...changes do not reflect on my page...so how do I find out which css its using ??can't figure out nothing from a path like that

[edit]

For this Editor mainly 3 css files are being used namely Editor.Default.css,Window.Default.css and ToolBar.Default.css..now when I view page source , I can't find refernce to any of these 3 css files...Also in firebug , under "Styles" where that weird css path is shown, its displaying CSS classes like .reToolbar , etc...now ALL the Skins' CSS files have got this CSS class ".reToolbar" ..so how to find out which CSS file's class is this particular ".reToolbar class" ??

View 1 Replies

Telerik RadEditor Memorystream/string Save To RTF

May 21, 2010

The required functionality I am aiming for is to pull out RTF content from a database, edit it through a web interface (with a WYSIWYG editor) and then place the modified text back in to the database (in RTF format).

The control that I am using to do this is Telerik RadEditor (we have a license already for these controls). In the most recent version there appears to be functionality to load in RTF content from a string or a stream, but the only method I can see that is exposed for getting RTF back out is exportToRTF(); this method modified the headers and allows you to save a RTF version of the content you have just edited as a file.

The functionality to convert from HTML to RTF must exist somewhere within their library as you can export a RTF file, but I can not find any publicly exposed methods to pass this in to a stream or a string.

Does anybody know of a way that I can convert the HTML back to RTF using the Telerik libraries without saving out to a file?

View 1 Replies

Telerik RadEditor Image Manager / Integration With User Documents Storage Engine?

Feb 14, 2010

We are using Telerik RadEditor control in our project and having some problems with its integration with our user documents storage engine. We've implemented custom content provider for Telerik image manager and it shows correct documents in dialog. But in doesn't switch between images while selection. You can see this on this picture. We've tested this behaviour on the blank ASP.NET page without any additional CSS or JS. Rad editor tag could be found below. Please help! Why do this could happen?

<telerik:RadEditor ID="radEditor" runat="server"
ToolbarMode="ShowOnFocus"
ToolsWidth="402"
EditModes="Design"
ToolsFile="~/RadEditor.xml"
Skin="Default">
<ImageManager ViewPaths="IMAGES" EnableImageEditor="False" ContentProviderTypeName="FileStorageContentProvider, App_CODE" />
</telerik:RadEditor>

View 2 Replies

C# - How To Get Telerik's RadEditor's Spell Checker To Start Automatically When Incorrect Word Is Typed

Jan 25, 2011

Currently I have to click the Spell check button on RadEditor's toolbar to see the word suggestions. Is there any way for that? I did find a way to run Spell Checker on Submit Button click but how do I get what I want? I have gone through forums but in vain. Need help please. Thanks

Telerik people have not replied. It's been three days now so asking here. Anybody who is familiar with Telerik controls please help me out.

edit:
Anybody in here who is familiar with Telerik controls.

View 1 Replies

Forms Data Controls :: When Run The The Code It Is Giving The Error As "Index Was Outside The Bounds Of The Array?

Jan 6, 2011

I am developeing web application using csharp. The the code is reading the text file load on to Gridview, but when I run the the code it is giving me the error as "Index was outside the bounds of the array."Where I am going wrong. The code and records are as follows:

[Code]....

Records on Text File
6/5/2010,Bun,2010,H,20,50040
6/5/2010,BUG,2010,G,26,90000
16/5/2010,COT,2010,B,26,45040

View 7 Replies

Access :: Insert Statement Giving Syntax Error

Sep 22, 2010

I have a MS Access table with the "ModelID" column set as AutoNumber and primary key. The ModelID is set as Field Size --> Long Integer, New Values --> Increment, Format --> General Number, Indexed --> Yes (No Duplicates).

Here is the code i am trying to execute, and is giving me an exception -> insert into syntax error:

[Code]....

I have no idea why this is happening? I do not usually use MS Access, i usually use MS SQL Server however this website has an older database. I had to create the tbl_Models as it is a new table and i am thinking i maybe setup the table wrong as i have similar insert into statements that work on other tables....

View 3 Replies

Web Forms ::code Not Working And Nor Giving Any Error ?

Mar 2, 2011

I have 2 textbox,textbox1 and textbox2.On entering value in textbox 1(ex. on entering 35 in textbox1) automatically the value in textbox2 should be 100-textbox1(ex. textbox2 should contain 65 i.e 100-35) and it cant be edited by the user.Textbox2 is readonly.And the textboxes can contain decimal values also .I have wrote my code but its not working and nor giving any error .

[code]...

View 11 Replies

Are Content Web Forms Able To Access Variables Declared In The Code Behind Section Of It's Master Page

Dec 1, 2010

I have a Master Page which controls the styling of my site. In the Code Behind, there are a few class instances instantiated as well as variables. These classes validate user access and then create user objects

I have a few Web Content Forms which carries out instructions based on the user objects. So far it seems that on each Web Content Form I have to create new instances of the classes found on the Master Page. This is doubling my work for every Web Content Form.

Is there anyway I can inhereit Classes and objects instantiated in the Master Page Code Behind?

View 2 Replies

Written Code To Access Public Variable Of Asp Onclick Event On Button But Its Not Giving Desired Output?

Feb 10, 2010

i have written following code to access public variable of asp.net onclick event on button but its not giving me desired output.. please check it:

<asp:Button runat="server" CssClass="txtdisplay" ID="Button1"
Text="Browse all jobs in area"
OnClientClick="return navigateURL('index.aspx?c=<%=cityid %>')" />

View 1 Replies

Throwing Exception Message Giving Internal Server Error HTTP Code 500 On Live Site

Oct 4, 2010

using vb.net/asp.net 2005

when a user enters a bad email I am doing a check on this and throwing an exception message as follows, this works fine on the test site but for some reason the same code on the live site gives a "internal server error" (http code 500). The code below:

[Code]....

not certain why this is happening, I assume that it's some server or config difference between the test and live sites. has anyone seen this before? For a quick fix i'm registering javascript alert and showing the same text so it works but I would like to figure out why the code above is not working.

View 1 Replies

Forms Data Controls :: Master / Detail Page - Updating Detail Records - Need Access To Master ID (key)

Jul 30, 2010

I have an "Edit" page that uses a FormView bound to an EntityDataSource. The page is called with the ID field of the record to edit in the query string: "EditEmployee.aspx?ID=10". The EDS the FormView is bound to is using: AutoGenerateWhereClause=true and a QueryStringParameter. Below the FormView I have a ListView that contains some child records of the FormView. The ListView is bound to a seperate EDS and also uses the (same) QueryStringParameter.

The problem I am having is when this ListView attempts to Insert or Edt a column I receive an error because I don't have the ID field (EmployeeID) of the parent bound anywhere in the ListView (and obviously, it is setup as a ForeignKey so it fails, like it should). Any advice on the best way to get this ID (EmployeeID) column bound in the ListView? There are many things I can do in code behind, but I would like to solve this in the markup if possible. I can move the ListView so that it is inside of the FormView if necessary.

View 1 Replies

AJAX :: Page Refresh Clears RadioButtonList / Giving Error?

Dec 6, 2010

When I refresh a page (either manually or with meta tags) after uploading an image with AsyncFileUpload, it clears out a RadioButtonList I'm using and this causes errors when the user tries to go to another page. The strangest thing is that the RadioButtonList only clears after the first refresh; when I click the RBL back to the original value, then refresh the page, it doesn't affect the RBL anymore.

All the applicable controls are enclosed in Update Panels.

(I wrote about a similar problem in forums.asp.net/t/1609492.aspx but I suspected that that problem had to do with a ModalPopupExtender and AsycnFileUpload combination. However, after removing the MPE, the problem still occurs so now I can only conclude that the AsynchFileUpload is the problem.)

View 9 Replies

Web Forms :: Master Pages - How To Access Content Page From Master Page

Sep 5, 2010

I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists. You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?

View 4 Replies

User Controls :: Find And Access Master Page Control From UserControl Inside Content Page

Jan 24, 2014

On masterPage i have button btnTest, how hide button from masterPage on userControl.ascx

example:  

btnSecondPage_click
{
   btnTest.visible = false;
}

View 1 Replies

Web Forms :: How To Access Content Page Controls From Master Page

Feb 12, 2011

it is very easy to access master page control from content page like

[code]....

but how could i access controls of content page from master page. suppose a textbox there in content page and one button is there in master page. i want that when i will click on master page button then i want to show the text of textbox in the content page in the label of master page. how to achieve it.

View 1 Replies

C# - Access Master Page / Child Page Controls From Class?

Jul 26, 2010

I have a div on my master page and I want to use it for showing page errors. I have an error display class and it works fine. My problem is that in some instances, the error gets displayed even before the tag resulting in (non)-display of the message. This is mostly with code that has response.redirect.

I want to counter this by having the error shown on a div within my master page.

How can I access <div id="errorSegment" runat="server">?

View 2 Replies

Allowing The Content Page To Access The Master Page Controls?

Sep 13, 2010

I'm trying to make my masterpage work with my content page, allowing the content page to access the master page controls. I get the error:

Parser Error Message: The 'mastertype' directive must have exactly one attribute: TypeName or VirtualPath

This is on the lines:<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="viewProduct.aspx.cs" Inherits="AlphaPackSite.viewProduct"
MasterPageFile="MasterPages/Main.master"
title="Hi there!" [code]...

I'm a bit confused with namespaces and such so may have got them wrong, but all pages are in the same namespace now I beleive.

Update,When I turn it to:

<%@ MasterType VirtualPath="MasterPages/Main.master" %>

I keep getting the error: Compiler Error Message: CS0030: Cannot convert type 'AlphaPackSite.Main' to 'ASP.masterpages_main_master'

Source Error:

Line 147: public new ASP.masterpages_main_master Master {
Line 148: get {
Line 149: return ((ASP.masterpages_main_master)(base.Master));
Line 150: }
Line 151: }

View 4 Replies

C# - Accessing Top Master Page Properties In A Nested Master Page Code Behind?

Feb 18, 2010

I have a nested master page that has its own master page. The parent master page has a property defined in its code behind.

Public ReadOnly Property SelectedPage() As String
Get
Return _selectedPage
End Get
End Property

How can I reference the parent master page's property from within either the child master page's code behind Page_Load or aspx template page?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved