Last post Jan 13, 2010 07:25 AM by MOHAN SHARMA
Jan 08, 2010 03:46 AM|MOHAN SHARMA|LINK
But images are not displaying when i use that control in aspx page.
my code is
[assembly: WebResource("ClassLibrary1.mail2mohanpyare.skins.kama.icons.png", "img/png")]
and how can i convert ckeditor in class library.
Plz help, It's urgent.
custom server control
Jan 08, 2010 06:26 AM|Abdulla.AbdelHaq|LINK
make sure that the "Build Action" property for the image is set to "Embedded Resource"
Jan 08, 2010 07:41 AM|MOHAN SHARMA|LINK
Thanks buddy But i have already done this.
Jan 08, 2010 08:08 AM|Abdulla.AbdelHaq|LINK
send your code, your assembly name (project), and the code where you are rendering the image
Jan 10, 2010 12:57 AM|jkirkerx|LINK
It must be in the class code, in vb it's
Dim cs As ClientScriptManager = Me.Page.ClientScript
Dim rsType As Type = Me.GetType()
If (Not cs.IsClientScriptIncludeRegistered(rsType, "ItemIndex")) Then
cs.RegisterClientScriptInclude("ItemIndex", cs.GetWebResourceUrl(rsType, "redCopper.ice5.admin_management.ItemIndex.js"))
Dim TheImageURL As String = cs.GetWebResourceUrl(rsType, "redCopper.ice5.admin_management.loading_animation_liferay.gif")
Jan 11, 2010 04:06 AM|MOHAN SHARMA|LINK
public class Test : System.Web.UI.WebControls.WebControl, INamingContainer
System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image();
public override ControlCollection Controls
protected override void CreateChildControls()
img.ImageUrl = "/makeup.jpg";
img.Width = 500;
img.Height = 500;
img.BorderWidth = 5;
img.BorderColor = System.Drawing.Color.Red;
// Set subcontrols behavior
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCopyright("Copyright © 2010")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: WebResource ("Test.makeup.jpg","img/jpg")]
// The following GUID is for the ID of the typelib if this project is exposed to COM
// Version information for an assembly consists of the following four values:
// Major Version
// Minor Version
// Build Number
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
I want when i add this control to my .aspx page, image should be displayed. I am just testing this. I have to make a class library of this type.
any suggestion will be appreciated.
Jan 11, 2010 07:12 PM|jkirkerx|LINK
You need to put a client script editor on the page, to call an embedded object from within the dll
That's what the cs is, and the rs
That would go in your createchildcontrol
Jan 12, 2010 01:11 AM|MOHAN SHARMA|LINK
Thanks Dear, I simply want to make a editor like ajax editor, everything is embedded in .dll file. When control is added to .aspx page, all images like bold, italic, and othere are displayed without putting these files separately in project.
Jan 12, 2010 01:19 AM|MOHAN SHARMA|LINK
Jan 12, 2010 05:36 PM|jkirkerx|LINK
You misread my comment. The editor I mentioned is an asp.net object called client script manager.
The client script manager manages client scripts, in which it works with embedded content.
Jan 13, 2010 07:25 AM|MOHAN SHARMA|LINK
Dear Thank Again.
I am not getting how to implement this. I just want to add functionality like ajax editor, control is added to the aspx page and done. We don't put anycode in our project to display images from ajax toolkit dll. what to do to implement this. How everything
that is merged in ajaxtoolkit class library(like images) and when control is added , images are displayed on the page.
Plz it's urgent.