Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > AutoPostBack property - TextBox

Reply
Thread Tools

AutoPostBack property - TextBox

 
 
mg
Guest
Posts: n/a
 
      10-22-2004
A WebControl TextBox posts back to the server whether or not the AutoPostBack
property is true, when the TextBox looses focus following a text change. So,
what's the purpose of this property?
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      10-22-2004
What you say is only partially true. When you use Autopostback, there's a
postback not only when you press Enter in the testbox, but also onblur such
as when you tab out of the textbox. Try the following code with autopostback
true and then false and ttab in and out of the textbox. You'll see the
difference.

<%@ Page Language="VB" %>
<script runat="server">

sub page_load
if ispostback then
label1.text=now.tolongtimestring()
end if
end sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:Label id="Label1" runat="server">Label</asp:Label>
</p>
<p>
<asp:TextBox id="TextBox1" runat="server"
AutoPostBack="True"></asp:TextBox>
</p>
<!-- Insert content here -->
</form>
</body>
</html>


"mg" wrote:

> A WebControl TextBox posts back to the server whether or not the AutoPostBack
> property is true, when the TextBox looses focus following a text change. So,
> what's the purpose of this property?

 
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
Hide textbox / Make textbox not visible (NOT USING visible property) Jurjen de Groot ASP .Net Web Controls 0 05-19-2008 09:50 AM
problem with AutoPostBack property of textbox!!!! Mariame ASP .Net Web Controls 0 11-22-2005 11:55 AM
AutoPostBack on TextBox loses Focus - Steve - ASP .Net 3 06-29-2004 08:52 PM
ValidatonSummary control not working on an autopostback textbox Neo ASP .Net 1 06-24-2004 04:59 AM
TextBox AutoPostBack event not firing correctly Ben Fidge ASP .Net 2 01-30-2004 12:32 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57