.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Editor Custom Button with template HTML

Posted By:      Posted Date: October 02, 2010    Points: 0   Category :ASP.Net


How can I add button to the toolbar that will add a small html template text to content?

For example, when I click on that button, I want to "<table><tr><td><b>Hello world</b></td></tr></table>" be added to the content.

Thanks in advance,


View Complete Post

More Related Resource Links

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

Embed Youtube inside Ajax Html Editor- problem



When inserting a simple embed of youtube inside the ajax editor, on firefox and chrome problems occur. On the other hand on internet explorer 8 everything works fine. I found this solution http://www.nopcommerce.com/boards/t/4228/bug-in-ajax-html-editor.aspx . 

My question is where do I find the DesignPanel.pre.js ?


Roderick Vella

Html Link Button


Hi All,

I would like to create a html link button(in aspx page) so that the page could not post back and some controls to display on clicking link button.

Can any one of you help me regarding this issue?

Let me know if you have any queries.



ASP.NET HTML Editor - Upload images

The article ASP.NET HTML Editor - Upload images was added by adarshtated on Tuesday, June 29, 2010.

In this article we are seen how to create a custom HTML Editor control to add image button in it.Create A Class-----------CustomEditor.cs------------------Add Name Spaceusing AjaxControlToolkit.HTMLEditor;namespace MyControls{ public class CustomEditor



I'm looking into using the HTMLEditor from the toolkit. I know its open source which isn't the problem. The problem is that I don't want to have my program to be open source but would like to use the editor. The source code I'd like to be paid for where the compiled version (the dlls and aspx pages) will be free to download. Is it possible to do that?

can template save custom pages?


I created a template off a site I made last year (without content). That site had some custom pages with webparts on them.  These pages were linked to from the Quick Launch menu.  I just made a new site using that template and it appears the custom pages weren't part of the template as when I click on the links to them in the QL menu, I get a 404 page not found error. I tried again saving the template with content this time and my custom pages show up - but then I have all the lists/libraries filled with old content.  Any remedy?

I am on MOSS 2007 and can use Designer.

Custom Button (Sharepoint 2007)




I have a relatively small project to build a class sign up portal for my company.  I am about 90% done and this is one I have so far:


1 custom list off all classes called “Classes” (Class name, Data, teacher, etc, ..)

1 custom list of employees who signed up called “Signup sheet” (Employee Name, Class  name)


What I want is when you display a class information from the “Classes” list, I want a button on the bottom called “sign up for this class” that brings me to the new item page of “Signup sheet” with the class already filled in for you.  Seems easy on paper but I have been trying to do this for weeks.


I am ok with share point designer and am open to any suggestions.


Thanks in advanced,


Infopath button click event in custom workflow code.


Hi All,

I have designed the infopath form(Init) and integrated with my state machine workflow. i want to access button click event (designed in Infopath form) in my workflow code.

Can you help me.




System.Net.Mail HTML Template Problem


What do I need here ?????? To make this work??

Dim MassMail As New MailMessage()

        Dim Template As ??????????????

        MassMail.To.Add(New MailAddress(TextBox_massemailto.Text))
        MassMail.From = New MailAddress("You@me.com")

        ' MassMail.CC.Add()
        MassMail.Subject = TextBox_massemailsubject.Text
        MassMail.Body = TextBox_massemailBody.Text
        ' MassMail.Body = Template.BodyFileName = "EmailTemplates/BusinessAdBrochure.htm"
        MassMail.Priority = MailPriority.High

        Dim smtpclient As New SmtpClient("relay-hosting.secureserver.net")
        smtpclient.Credentials = New System.Net.NetworkCredential(""You@me.com"", "pasword")
        smtpclient.Port = 25
        smtpclient.EnableSsl = False

Html.RenderPartial appears to be stripping Model of custom attributes



I have implemented a custom ModelMetadataProvider so that I can decorate my view models with some custom attributes and everything was working fine until I made use of a Partial View.

The following code in my view works fine: -

<%: Html.DisplayFor(x => x.Results) %>

Results is a List which renders a custom display template and is also decorated with a custom attribute.  Using breakpoints, after the above line and prior to the code within the custom display template, the overridden CreateMetadata method in my custom ModelMetadataProvider is invoked.  If I look at the attributes collection parameter I can see that it does contain my custom attribute thus everything working as expected.

However, if I replace the above with the following line of code in my view then it breaks: -

<% Html.RenderPartial("ApplicationSearchResults", Model.Results, new ViewDataDictionary()); %>

All the Partial View contains is: -

<%: Html.DisplayFor(x => x) %>

Again using breakpoints, after the above line and prior to the code within the custom display template, the overridden CreateMetadata method in my custom ModelMetadataProvider is invoked.  But this time if I look at the attributes collection parameter my custom attribute is not there.

Any idea

Where is StartPage.cproj : Custom Start Page Project Template


I am reading through Wrox Professional Visual Studio 2010.
In Chapter 3, there is an example of how to customize and extend the start page.

So he wants you to copy the files from C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\StartPages\<Culture>
C:\Users\<user name>\Documents\Visual Studio 10\StartPages. He say you may need to create this because it may not exist by default. So I would just copy the files into:
C:\Documents and Settings\Sam\My Documents\Visual Studio 2010\StartPages and work from there right?

Then he says double click StartPage.csproj to opent the WPF project in Visual Studio 2010.
But StartPage.csproj simply does not exist anywhere.

I have installed Visual Studio 2010 sdk and the Custom Start Page Project which shows up in extension manager.
I just can't figure out how to use it.

I am on Windows XP.

corrupt html from custom control on win2003/iis6 box


Hello everyone -- first time poster and relative newcomer to the boards.  This bug I'm tackling has me at my wits' end and it's come time to turn to the masses!  If this is posted in the wrong forum and/or has already been addressed, I apologize.  However, I've done thorough searches and haven't come across anything akin to what I'm facing.

I'm working with a website that has a set of custom controls, all descending from a base class.  These controls take DataSets returned from web services and renders custom html via overriding the Render method.  Everything works fine on my local box and my coworker's box (both xp machines running iis 5).  However, on our server (windows server 2003, 64-bit, iis 6), the html rendered by the browser appears corrupt, with garbage replacing individual characters, as follows:


Standard HTML button causes postback in FF?

Hello,     I'm doing some work with Javascript and I'm having an issue getting my site to work correctly in firefox.  I have the following button: <button id="myButton" onclick="SomeJavaScriptFunction('myParam')">Button</button> When I click on this button in IE7, it simply runs the javascript function and stops When I click on this button in FF, it causes a full page postback.  Why? Is there a good workaround for this issue? Thanks, Joshua Foulk

Html editor word wrap problem

I created an html editor which uses an iframe for designing. The iframe doesnt wraps the text within it.... but the text keeps on extending in the same row towards the right. i tried setting scrolling='no' but it didnt work... tried word-wrap:break-word but thats also of no use........ please help! 

listview with button in item template - how do I handle the click event?

Hello,Using a listview control for the first time... I need a button for each item, and of course I need to handle the click event for the buttons... upon clicking a particular button I of course need to know which item the button is associated with so the appropriate action can be taken...In VS, I can't select the button and see my list of available events in the properties window like is normally done for controls outside of templates like this... what do I need to do?

Need step-by-step Custom Template Help

I would like to create 5 custom templates and deploy the same ones to all 13 site collections (living under one web app). Here's what I can successfully do: 1. Create a site 2. Turn off features (on a hunch after experiencing the below problems) 3. Add branding, web parts, etc. 4. Site Settings -> Save Site as Template 5. Test by immediately creating a site in the same site collection with the template (this works). However: * Weeks to months after creating the template, it stops working (in the same site collection). Could be something I'm configuring, I don't know. Users get message "The template you have chosen is invalid or cannot be found." * If I go to the template gallery, right-click and save-as,  put the template on my desktop, and then upload it to another site collection, it doesn't work in the new site collection. Again, "The template you have chosen is invalid or cannot be found." When I open the template and look at the code, I see references to absolute URLs from the site where the template was created. Would really prefer to deploy these templates without coding. * If I use stsadm -o addtemplate -filename "filename.stp" -title "title" the template also doesn't work. It allows me to create a site with it and set permissions, but then I immediately get: Server Error in '/' Application. The resource cannot be
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend