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?