Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to make impossible to select content of textbox?

Reply
Thread Tools

how to make impossible to select content of textbox?

 
 
Luc
Guest
Posts: n/a
 
      03-01-2010
Hi,

i need two textboxes, one for entering and another for confirming an
emailaddress.

What i want is to make impossible to select the emailaddress in the first
textbox in order not to be able to copy it in the second textbox.

I'm sure it's possible to do that asp.net (ajax?), but how?
Thanks
Luc


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-01-2010
On Mar 1, 10:59*pm, "Luc" <(E-Mail Removed)> wrote:
> Hi,
>
> i need two textboxes, one for entering and another for confirming an
> emailaddress.
>
> What i want is to make impossible to select the emailaddress in the first
> textbox in order not to be able to copy it in the second textbox.
>
> I'm sure it's possible to do that asp.net (ajax?), but how?
> Thanks
> Luc


Hi Luc

try

<asp:TextBox ID="TextBox1" runat="server"
oncopy="return false"
onpaste="return false"
oncut="return false"></asp:TextBox>

Hope this help
 
Reply With Quote
 
 
 
 
Luc
Guest
Posts: n/a
 
      03-02-2010
Thanks

"Alexey Smirnov" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
On Mar 1, 10:59 pm, "Luc" <(E-Mail Removed)> wrote:
> Hi,
>
> i need two textboxes, one for entering and another for confirming an
> emailaddress.
>
> What i want is to make impossible to select the emailaddress in the first
> textbox in order not to be able to copy it in the second textbox.
>
> I'm sure it's possible to do that asp.net (ajax?), but how?
> Thanks
> Luc


Hi Luc

try

<asp:TextBox ID="TextBox1" runat="server"
oncopy="return false"
onpaste="return false"
oncut="return false"></asp:TextBox>

Hope this help


 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-02-2010
On Mar 2, 3:15*pm, "Luc" <dfgdf@sdfsd> wrote:
> Thanks
>
> "Alexey Smirnov" <(E-Mail Removed)> schreef in berichtnews:(E-Mail Removed)...
> On Mar 1, 10:59 pm, "Luc" <(E-Mail Removed)> wrote:
>
> > Hi,

>
> > i need two textboxes, one for entering and another for confirming an
> > emailaddress.

>
> > What i want is to make impossible to select the emailaddress in the first
> > textbox in order not to be able to copy it in the second textbox.

>
> > I'm sure it's possible to do that asp.net (ajax?), but how?
> > Thanks
> > Luc

>
> Hi Luc
>
> try
>
> <asp:TextBox ID="TextBox1" runat="server"
> oncopy="return false"
> onpaste="return false"
> oncut="return false"></asp:TextBox>
>
> Hope this help


I'm glad that it's helped you out. I just noticed that oncopy and
onpaste are not working in Opera
 
Reply With Quote
 
Luc
Guest
Posts: n/a
 
      03-03-2010
Maybe one more question:

I use Visual Web Developer but when i go to the properties of Textbox in the
aspx file, i only see OnLoad, OnUnload and some others, but no oncopy,
oncut, onpaste.
Are those functions asp.net functions or javascript? If javascript, where
can i see the whole list of such functions?

Thanks




"Alexey Smirnov" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
On Mar 2, 3:15 pm, "Luc" <dfgdf@sdfsd> wrote:
> Thanks
>
> "Alexey Smirnov" <(E-Mail Removed)> schreef in
> berichtnews:(E-Mail Removed)...
> On Mar 1, 10:59 pm, "Luc" <(E-Mail Removed)> wrote:
>
> > Hi,

>
> > i need two textboxes, one for entering and another for confirming an
> > emailaddress.

>
> > What i want is to make impossible to select the emailaddress in the
> > first
> > textbox in order not to be able to copy it in the second textbox.

>
> > I'm sure it's possible to do that asp.net (ajax?), but how?
> > Thanks
> > Luc

>
> Hi Luc
>
> try
>
> <asp:TextBox ID="TextBox1" runat="server"
> oncopy="return false"
> onpaste="return false"
> oncut="return false"></asp:TextBox>
>
> Hope this help


I'm glad that it's helped you out. I just noticed that oncopy and
onpaste are not working in Opera


 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-03-2010
On Mar 3, 3:16*pm, "Luc" <dfgdf@sdfsd> wrote:
> Maybe one more question:
>
> I use Visual Web Developer but when i go to the properties of Textbox in the
> aspx file, i only see OnLoad, OnUnload and some others, but no oncopy,
> oncut, onpaste.
> Are those functions asp.net functions or javascript? If javascript, where
> can i see the whole list of such functions?
>
> Thanks
>
> "Alexey Smirnov" <(E-Mail Removed)> schreef in berichtnews:(E-Mail Removed)...
> On Mar 2, 3:15 pm, "Luc" <dfgdf@sdfsd> wrote:
>
>
>
>
>
> > Thanks

>
> > "Alexey Smirnov" <(E-Mail Removed)> schreef in
> > berichtnews:(E-Mail Removed)...
> > On Mar 1, 10:59 pm, "Luc" <(E-Mail Removed)> wrote:

>
> > > Hi,

>
> > > i need two textboxes, one for entering and another for confirming an
> > > emailaddress.

>
> > > What i want is to make impossible to select the emailaddress in the
> > > first
> > > textbox in order not to be able to copy it in the second textbox.

>
> > > I'm sure it's possible to do that asp.net (ajax?), but how?
> > > Thanks
> > > Luc

>
> > Hi Luc

>
> > try

>
> > <asp:TextBox ID="TextBox1" runat="server"
> > oncopy="return false"
> > onpaste="return false"
> > oncut="return false"></asp:TextBox>

>
> > Hope this help

>
> *I'm glad that it's helped you out. I just noticed that oncopy and
> onpaste are not working in Opera- Hide quoted text -
>
> - Show quoted text -


Those are DHTML events. That's the reason why you don't see them.
Because ASP.NET doesn't "know" them, they will be rendered to the
client "as is".

You can find more events here http://msdn.microsoft.com/en-us/library/ms533051.aspx

Hope this helps.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
impossible to delete file because it is impossible to take ownership Devvie Nuis Computer Support 21 04-20-2009 02:07 AM
impossible to have initialization script in master page content? PJ6 ASP .Net 1 09-17-2007 02:36 PM
File select dialog - Impossible? =?Utf-8?B?V29tYmxldWs=?= ASP .Net 0 02-09-2007 01:56 PM
Making the simple impossible and the impossible unthinkable... xfx.publishing@gmail.com Perl Misc 5 06-30-2006 11:50 AM



Advertisments