Allowing creativity with rich text

Certify and Increase Opportunity.
Be
Govt. Certified ASP.NET Programmer

Allowing creativity with rich text

Rich text can be added in Textbox control by third party tools like

  • FreeTextBox
  • http://www.codeproject.com/jscript/htmlarea.asp

Adding JavaScript editors

Web developers have been working around the limitations of the browser for a long time by using a combination of server-side processing and client-side processing. Working logic and application processes on the client-side allows browser based applications to seem more responsive and to have more “snappiness” to them. For client-side development in the past, most developers turned to JavaScript and intermingled this programming language into their classic Microsoft® Active Server Pages along with their server-side Microsoft Visual Basic® Scripting Edition or Microsoft JScript® code. Now with Microsoft ASP.NET and the new models that it provides, Web developers often wonder how to properly work with their JavaScript functions in their ASP.NET pages.

Adding JavaScript to a Server Control

It is quite easy to add JavaScript to a specific server control that resides on an ASP.NET page. Let’s take a look at the button server control as an example. If you drag and drop a Button HTML server control (HtmlInputButton Class) onto a page using either Microsoft Visual Studio® .NET or the ASP.NET Web Matrix and run it as a server control, it should have the following construction:

<INPUT type="button" value="Button" runat="server" id="Button1">

This is a normal button that can be programmatically manipulated in the code-behind or server-side script of an ASP.NET page. For example, to assign the button text when the page is generated, simply use the value property of the button after this element is turned into an HTML server control (right-click on the control and select Run As Server Control).

Visual C# .NET

void Page_Load(object sender, EventArgs e) {
   Button1.Value = DateTime.Now.ToString();
}

This simply provides a button on the page that shows a date and time as the text of the button.

Get industry recognized certification – Contact us

Menu