1 Replies - 3297 Views - Last Post: 09 February 2009 - 05:44 AM Rate Topic: -----

#1 Remyad   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 05-February 09

write text in the textbox as uppercase and lowecase

Post icon  Posted 09 February 2009 - 05:39 AM

Hi
i have a textbox and two buttons for uppercase and lowercase.i have code for converting the text written in the textbox to change to uppercase and lowercase.that code is below.i need the code to write text in textbox in uppercase and lowercase after the button is clicked.ie if i want to write text like this "hai HOW are u".aftr writing hai if i click uppercase i should be able to write how in upper case and then i click lowercase.i should be able to write the next in lower case.the above i gave one example to understand what i want and i dont want that text to write.im coding in c#

protected void To_Lowercase(object sender, EventArgs e)
{
msgtxt.Text = msgtxt.Text.ToLower();

}
thanks

This post has been edited by Remyad: 09 February 2009 - 05:53 AM


Is This A Good Question/Topic? 0
  • +

Replies To: write text in the textbox as uppercase and lowecase

#2 dklingman   User is offline

  • D.I.C Regular
  • member icon

Reputation: 33
  • View blog
  • Posts: 263
  • Joined: 23-December 08

Re: write text in the textbox as uppercase and lowecase

Posted 09 February 2009 - 05:44 AM

personally i wouldn't even use a asp.net control to do this and just use a standard html button control. add some javascript and set the text-transform style to either uppercase or lowercase. there's no need to perform a postback if you just want to convert the letters to upper or lowercase
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1