dialog box with line break

Leave a comment


string script = “alert(\”This dummy matter.\”+’\\n’+\” This dummy matter ‘This dummy matter’ \”+’\\n’+\” This dummy matter\”);”;
Page.ClientScript.RegisterStartupScript(this.GetType(), “script”, script, true);

Advertisements

Please wait on button click

1 Comment


C#:::

protected void Button1_Click(object sender, System.EventArgs e)

{
System.Threading.Thread.Sleep(5000);
ClientScript.RegisterClientScriptBlock(this.GetType, “reset”, (“document.getElementById(\’”
+ (Button1.ClientID + “\’).disabled=false;”)), true);
}

protected void Page_Load(object sender, System.EventArgs e) {
Button1.Attributes.Add(“onclick”, (ClientScript.GetPostBackEventReference(Button1, “”) + “;this.value=\’Please wait…\’;this.disabled = true;”));

vb.net:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

System.Threading.Thread.Sleep(5000)

ClientScript.RegisterClientScriptBlock(Me.GetType, _ “reset”, “document.getElementById(’” & Button1.ClientID & “‘).disabled=false;”, True)

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Button1.Attributes.Add(“onclick”, ClientScript.GetPostBackEventReference(Button1, “”) _ & “;this.value=’Please wait…’;this.disabled = true;”)

End Sub

Using Free Text Box in ASP.NET displaying HTML formatted text

18 Comments


Why do we must use FreeTextBox (FTB) control?

This will be useful when we want to display text with HTML formatting with label control.
when you enter the text in FTB it will saves with all the HTML tags in the table.
while displaying the label control along with browser renders HTML.

Before you start with this control you must it in /Bin folder.

Download the Free TextBox at: http://freetextbox.com
In the aspx page put this:

<%@ Register TagPrefix=”FTB” Namespace=”

FreeTextBoxControls” Assembly=”FreeTextBox” %>
But remember add this in <Page> tag of aspx: ValidateRequest=”false”
ex:

<%@ Page Language=”C#” MasterPageFile=”~/MasterPage.master” AutoEventWireup=”true” CodeFile=”EnterFAQs.aspx.cs” Inherits=”EnterFAQs” Title=”Winning Edge :: FAQs” ValidateRequest=”false” %>

<%@ Register TagPrefix=”FTB” Namespace=”FreeTextBoxControls” Assembly=”FreeTextBox” %>

<FTB:FreeTextBox ID=”txt_desc” runat=”server” Width=”300px” Height=”150px”></FTB:FreeTextBox>

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

Leave a comment


Some time while viewing your asp.net pages you will encounter with an error like the below:

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. ”
This will be solved if you close the databbase connections in that page.

%d bloggers like this: