yes it is javascript function..eventhough i never used any but it used at my web..
it act amazing (well i'm still new :D)
to me the __dopostback (with 2 underscore at front) is like a function that call an ID of an control (.NET in my case) so it can execute the code behind those control
ex: i have one link button that with ID 'Delete' and a javascript
function that would prompt user wether he/she want to delete it and also Delete_Click sub at code behind
function Delete()
{
if (confirm(
'Do you want to delete the selected folder(s) and/or file(s)?'))
{
__doPostBack('Delete', '');
}
}
and a linkbutton that call Delete_OnClick sub at the code behind page
so it works like this:
1. it will executed the javascript function, prompt for "Do u want bla222"
2. if already confirm then it will search for a control ID and execute the event for coressponding control..since it only have OnClick event in my case so it execute the "Delete_Click" sub
3. u need to define a Delete_Click sub at code behind which is pagename.aspx.vb in my case..
the magic happened hehehe.hope all of u can understand what i mean..visit this site which make me understand about it a little than before..a little much :shy:
until then
Comments
First time I'm encountering it when it's confusing me for extracting data from page to page, until I examining the codes behind it(the __doPostBack func. stored on every aspx page which use it) and just figure it out that it's just used to split the first string argument variable with '$' as escape sequence, then join them with ':' as new escape sequence, dunno why it have to do like that, perhaps purposed for some object model traversing or anythings else, dunno exactly what's quirks behind it :D.
Anyway it's give me clues on how to treat them on my app. VB6 codes, just Replace() '$' char with ':' then submit the form, voila, problem solved :D.
Well I think it's preety handy and quite cool func. thought, perhaps by combining it with AJAX tech. could make it better, 'cause for current state, it refresh the whole page every time that func. executed,
by using AJAX, we just need to refresh specific page's portion, maybe it would look like: __doPostBack('Display', '', 'DataDisplay'), and when it's executed, let say a div tag with id="DataDisplay" will refreshed it's contents to portions of data that retrieved from an another aspx page that handling Display_Click() func., uhmmm.. that sounds really tasty, yummy... :D.
by using AJAX, we just need to refresh specific page's portion, maybe it would look like: __doPostBack('Display', '', 'DataDisplay'), and when it's executed, let say a div tag with id="DataDisplay" will refreshed it's contents to portions of data that retrieved from an another aspx page that handling Display_Click() func., uhmmm.. that sounds really tasty, yummy... :D. -> hm..u saying AJAX is a food??? o noo.it's new to me :D
never tried AJAX..guess it's next when the Web is finish
about the div tag, i never learn HTML before so not sure what it is for..i guess it's a function for the HTML Table so i have some column or somehthing and it works for IE 5.x and above? am i right?
plz correct me if i'm wrong also always if u have some usefull link..plz tell me..i promise i'll be a good boy :D
EDIT: i've read w3school but still confuse :D
Remind me with one of my workmate, she really got indulge to learn web app. development, but all she got in her mind was HTML is DreamWeaver, hohoho.. how childish was thought that you have THONK(dooh how rude I'am :D)
No, div tag was used for grouping couples HTML tag elements, it get famous among tableless CSS-based web designers out there, have a look for couples of their awsome works at CSS Zen Garden.
tr, td, br tags, etc..just the simple one i think..
ut all she got in her mind was HTML is DreamWeaver, hohoho..-> o noo..HTML girl :D..well at least she already focused her mind not like me
thx for the explanation about div but still can't understand it until i figured it out how..:D
yes i've read the article before, indeed a nice one :D