Results 1 to 7 of 7

Thread: How to insert WML tag?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    How to insert WML tag?

    hi guys,

    should be a simple question on vb.net.

    i am trying to bold my welcome message like the following:

    Code:
    lblWelcome.Text = "<b>Welcome</b>"
    using openwave phone stimulator, instead of displaying Welcome, it is displaying <b>Welcome</b>.

    how do i get it to recognise wml tags?

    many thanks.

    Kent

  2. #2
    Lively Member
    Join Date
    Oct 2004
    Posts
    66

    Re: How to insert WML tag?

    If you want to bold your text just set the font property to bold

    VB Code:
    1. Me.lblWelcome.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

    You can set this in the form generated code, or just at form load

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    Re: How to insert WML tag?

    Quote Originally Posted by digita
    If you want to bold your text just set the font property to bold

    VB Code:
    1. Me.lblWelcome.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

    You can set this in the form generated code, or just at form load
    thanks a lot but i'm looking for a more specific solution because i need to find a way to insert line break as well. e.g. <br/>

    do you know how to do that?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    Re: How to insert WML tag?

    Quote Originally Posted by kulrom
    that what you talking about are tags ... and i'm afraid, you cannot find solution for your idea in vb.net ... as digita told you it possible only with FontStyle.Bold

    As thing goes worse your tag <br/> doesn't mean nothing .. i assume you thought for </br> ...
    thanks but i'm not sure if i understand what you mean. are you saying that tags dont work for vb.net?

    i am using vb.net to build a mobile application. wml tags still work if i code it this way:

    Code:
    Response.Write ("<b>welcome</b><br/>kulrom")
    but my purpose is to find out how to insert wml tags into objects like label and textbox.

    Code:
    lblWelcome.Text = "<b>Welcome</b><br/>kulrom"
    is this possible?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    Re: How to insert WML tag?

    Quote Originally Posted by kulrom
    i suppose NOT ... but you could keep trying maybe there is someone who will negate my affirmation ... btw <br/> is not correct tag but rather <br> and if you want to close </br>
    both <br> and <br/> work actually if i were to use response.write.

  6. #6
    Lively Member
    Join Date
    Oct 2004
    Posts
    66

    Re: How to insert WML tag?

    a line break is done like this

    VB Code:
    1. Label1.Text = "Line 1" & vbCrLf & "Line 2"

    And that .font style is the only way in vb.net, i actually looked it up at the msdn. vb.net does not accept html markup. Good luck, i hope this helps

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    108

    Re: How to insert WML tag?

    Quote Originally Posted by digita
    a line break is done like this

    VB Code:
    1. Label1.Text = "Line 1" & vbCrLf & "Line 2"

    And that .font style is the only way in vb.net, i actually looked it up at the msdn. vb.net does not accept html markup. Good luck, i hope this helps
    thanks digita, you have been helpful.

    i tried vbcrlf and it gave me error instead, before i decided to seek help in here.

    i guess i just have to live with response.write.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width