Solved

ISPOSTABCK property in VB.NET

Posted on 2006-06-13
4
805 Views
Last Modified: 2008-01-09
I would like to know where I can find the property ISPOSTBACK, for the webform or any web forms controls.

and what is the difference between ispostback and autopostback?

thanks
0
Comment
Question by:jskfan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
pradeepsudharsan earned 250 total points
ID: 16899561
Hi,
ISPOSTBACK is available for web form
Example:
 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
             
            If Not Page.IsPostBack Then
                 Response.Write("Post back event not occurs here")
                 'This block is executed only on the first  time the web form is loaded
            else
                  Response.Write("Post back event  occurs here")
                  'If any server event occurs like button click ,this block will fire
            EndIf
End Sub

AutoPostBack Property is available for web form controls like checkbox,..
-automatically posts back to the server when clicked.

Ex:

CheckBox.AutoPostBack =True
-------------------------------
Gets or sets a value indicating whether the CheckBox state automatically posts back to the server when clicked.

true to automatically post the state of the CheckBox control to the server when it is clicked; otherwise, false. The default is false.


try this link
http://www.codeproject.com/aspnet/autopostbackfocus.asp
Regards
Pradeep
0
 
LVL 1

Assisted Solution

by:el_hey
el_hey earned 100 total points
ID: 16899565
ispostback is not a property, rather it is a keyword use to test if the pages is reloaded..

autopostback is a property, if it is set to true then everytime you trigger the postback the page will be reloaded..

ispostback is a boolean keyword.
0
 
LVL 7

Assisted Solution

by:pradeepsudharsan
pradeepsudharsan earned 250 total points
ID: 16900695
Hi   el_hey ,

your comment is WRONG.

I you refer in MSDN 2003  ispostback is given as property of Page Class.(System.Web.UI.Page)
Page.IsPostBack Property
------------------------------
Gets a value indicating whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.
Property Value
-----------------
true if the page is being loaded in response to a client postback; otherwise, false.



AutoPostBack
----------------

AutoPostBack is built into the form-based server controls, and when enabled, automatically posts the page back to the server whenever the value of the control in question is changed. Because of the additional server requests it causes, it's not something you'll want to enable for all your controls, but for things that affect page display or change choices further down the form, it can be really handy. Not to mention the fact that it will save you a lot of time and headaches over trying to implement something similar on your own. Not that it's really all that complex to do on your own if you're good with javascript, but it's hard to get any simpler then just setting AutoPostBack="True"


Regards
Pradeep



0
 

Author Comment

by:jskfan
ID: 16902022
if you right-click on the web form and go to properties, the properties window of the web form doesn't show anything that says IsPostback. This is why I thought it's not a design view property.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question