Welcome to Dream.In.Code
Become an Expert!

Join 149,489 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,293 people online right now. Registration is fast and FREE... Join Now!




little help

 
Reply to this topicStart new topic

little help, string from TextBox

royroy7
9 Apr, 2007 - 07:46 PM
Post #1

New D.I.C Head
*

Joined: 6 Apr, 2007
Posts: 9


My Contributions
i want to effect on some of the text in textbox.
thats my class:

CODE
namespace Rnevo.textarea
{
    
    public class TextareaT
    {
        private int _row=20;
        private int _col=50;
        private string _txt = "Rnevo Channel";
      
        public void SetTextBox(TextBox t)
        {
            DateTime DT=new DateTime();
            DT = DateTime.Now;
            t.Rows = _row;
            t.Columns = _col;
            t.Text = _txt+" "+DT.ToString();
            t.Visible = true;
            
        }
  }
}


how my function should be?

i found this Javascript code but i want it to be in CS function


CODE
<script LANGUAGE="JavaScript">
<!-- Begin
function copyit(theField) {
    var selectedText = document.selection;
    if (selectedText.type == 'Text') {
        var newRange = selectedText.createRange();
        theField.focus();
        theField.value = newRange.text;
    } else {
        alert('select a text in the page and then press this button');
    }
}
//  End -->
</script>
<form name="it">

<p>This script allows you to select text on a web page and then copy it into a text box. Neat!</p>

<div align="center">

<input onclick="copyit(this.form.select1)" type="button" value="Press to copy the highlighted text" name="btnCopy">
<p>

<textarea name="select1" rows="4" cols="45"></textarea>
</div>
</form>
<!--   REST OF THE CODE    -->






anyone got something?

User is offlineProfile CardPM
+Quote Post

buddhasmiles
RE: Little Help
21 Apr, 2007 - 10:00 AM
Post #2

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 1


My Contributions
can u clearly explain what are ypu going to acheive

b u d d h a
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 05:13PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month