how to Underline a Perticular string in Vb.net

Last post 06-30-2009 12:52 AM by sumitd. 5 replies.

Sort Posts:

  • how to Underline a Perticular string in Vb.net

    06-22-2009, 10:39 AM
    • Member
      42 point Member
    • devjitendra
    • Member since 12-26-2008, 10:48 AM
    • Posts 35

     Hi All,

     

    I have a Require To Underline A Perticular String in Vb.net

    I trying tu use <u></u> but it doesn't works.

    It works in C#

     

    Thanks 

  • Re: how to Underline a Perticular string in Vb.net

    06-22-2009, 5:09 PM
    • Contributor
      5,138 point Contributor
    • papabear
    • Member since 08-08-2005, 3:49 PM
    • Posts 851

    There is no reason that should not work (it is old HTML after all) except for how you are using it. I am assuming it is NOT being used just within a page (ex: <u>just text I am underling</u>) but someone within code. Is this correct? If so, what is the code?

    thanks,

    m

    give me suggestions for what to blog... http://www.myfriedmind.com/techblog -> thx

    Mark as "Answered" if this solves that wee old problem...
  • Re: how to Underline a Perticular string in Vb.net

    06-22-2009, 5:13 PM
    • Contributor
      5,624 point Contributor
    • RatheeshC
    • Member since 04-25-2008, 6:05 PM
    • Posts 1,198

    Hi,

    Could you post the VB & C# code here..?

    Thanks

    Thanks
    Ratheesh

    Please mark it as answer if it resolves your issue.
  • Re: how to Underline a Perticular string in Vb.net

    06-23-2009, 10:46 AM
    • Participant
      1,374 point Participant
    • KyD
    • Member since 05-14-2007, 3:06 PM
    • Posts 376

    The code is old. 

    Can you send the string to the literal object and format the literal object instead?

    You should be usring style.  <asp:literal id="lit" style="text-decoration: underline;">

    IF Helpful() THEN
    chkboxMarkAsAnswer.checked = TRUE
    END IF

    KyD
  • Re: how to Underline a Perticular string in Vb.net

    06-30-2009, 12:23 AM
    • Contributor
      2,322 point Contributor
    • susain
    • Member since 10-29-2007, 11:51 AM
    • Hyderabad, Andhra Pradesh, India
    • Posts 642

    Hi devjitendra,

    Try this

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Test</title>
        <style type="text/css">
        .underline
        {
        text-decoration:underline;
        }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Label ID="lblMessage" runat="server" Text="Hi boss How r u" Font-Bold="True" ForeColor="Red" Font-Underline="True"></asp:Label>
            <p class="underline">Hi, How are you</p>
        </div>
        </form>
    </body>
    </html>

     

    Thanks,

    Farooq

    Linked In: http://www.linkedin.com/in/mohammedfarooq123

    Mark as answer if this post help full to you.
  • Re: how to Underline a Perticular string in Vb.net

    06-30-2009, 12:52 AM
    • Star
      10,646 point Star
    • sumitd
    • Member since 07-16-2008, 12:32 PM
    • Bangalore
    • Posts 1,872

    Try this:

    Public Shared Function Underline(ByVal value As String) As String
        If Not String.IsNullOrEmpty(value) Then
            Return "<u>" & value & "</u>"
        End If
        Return value
    End Function

    Please mark it as answer if it resolves the issue.

    visit: http://technicalsol.blogspot.com

    Latest ajax control toolkit (Release: May 13, 2009): http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27326
Page 1 of 1 (6 items)