How to make your ASP.Net label multilin

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Multiline.aspx.cs" Inherits="Multiline" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
   <title>Untitled Page</title>
   <form id="form1" runat="server">
           <asp:Label ID="lblMultiline" runat="Server" Text=""></asp:Label>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Multiline : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)

        lblMultiline.Text = FormatText("aspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebookaspdotnetcodebook");

    public string FormatText(string sText)

        int start = 0;
        int length = 40;
        int parts = sText.Length / length + 1;

        string strPart = "";
        while (start < sText.Length)
            int charactersToGet = start + length < sText.Length ? length : sText.Length - start;
            strPart = strPart + sText.Substring(start, charactersToGet) + "</br>";
            start += length;
        return strPart;


1 comment:

  1. HI I want to change value <embed name="nimbb_c069e67ec7" src="" width="320"....

    in this the value of guid value is different .. will come from database

    I want to make href for every guid which is there from database .. and when i click on that i want to display video related that GUID which will set upar line(<embed .....)