the current problem with the IE web behavior, is that it is disabled with
xp-sp2 for security reasons. you can use it with intranet sites where you
can force the users to trust your site, but it will not work with an
internet site. this is probably why MSN uses a javascript and a hidden frame
to do the polling.
-- bruce (sqlwork.com)
"Kikoz" <ki***@hotmail.com> wrote in message
news:uY**************@TK2MSFTNGP12.phx.gbl...
| This is a big issue. ASP.NET 2.0 will include this functionality but it's
| still dificult to implement and maintain and I found that solution to be a
| bit complicated in general. It will use the same principals I describe
| below, though.
|
| The easiest way to fetch data into page without postback is to use IE
| behaviors, namely WebService behavior (Microsoft provides it for free). It
| uses ActiveX built in IE 5.5 and does almost the same thing described by
| Anders who answered your question earlier.
| Because it can be interesting to everyone on this group I'll describe this
| stuff a little bit:
|
| The good thing about this is that your page which will render data from
| server doesn't have to be written in .net or php or whatever server side
| processing you use. It can be simple html page. All ActiveX objects used
| here comes with IE 5.5 and above, so you need to make sure that your users
| use this version of IE. The WebService behavior itself doesn't come with
| IE - you have to get it (see below) and put on your server. You have to
use
| some sort of data supply/source. The easiest way is to use web service
| (asmx) which you can create on your server.
| So, the process is relatively simple:
|
| 1. You create one or thousand WebServices on your server which html page
| will talk to to get the data it needs.
| 2. You load WebService behavior into your page (it's not a big file, IE
will
| cache it anyway). Normally I use div tag to hold this behavior and I
| "attach" behavior to this div through css class
| (.ws{behavior:url(/Blah/HTC/WebService.htc)}).
| 3. You can use "download" behavior included in IE to load WebService
| behavior.
| 4. Now let's say that you need to pre-fill some text box with all last
names
| that exist in your db that start with letters user typed into this text
box,
| much like selection box or IE AutoComplete feature.
| 5. Your script should detect typing and "ask" the div tag to go to your
| server and get particular data (all last names that start with typed
| characters) and bring it back by loading it into <xml> tag. I create
<xml>
| tag on the fly if result from the server is not empty. Then the simple
thing
| like "var dso = document.all.xmlTagName.recordset;" will give you ADO
| recordset with you use to create your selection box, loop through it,
| whatever.
|
| It's easy when you've done it before. It looks relatively difficult if you
| just starting. Read about it here:
|
http://msdn.microsoft.com/library/de...e/overview.asp
|
| Hope it helps,
| Kikoz
|
| "eXseraph" <eX******@discussions.microsoft.com> wrote in message
| news:C0**********************************@microsof t.com...
| > Hi,
| > As we know,in normal asp.net application, a browser need to send a
| > request to a server first to refresh its page. Now I need to design a
| > asp.net
| > application with real-time capability like the MSN Web Messenger. That
| > means
| > once the session between browser and server has been established, the
| > browser can get real-time messages with out sending requests
| > periodically.(Or
| > How to tell the browser that you need to send a new request to refresh
the
| > page.)
| >
| > Thanks in advance!
|
|