469,902 Members | 1,926 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

AJAX.Net

NH
Hi,

I have been toying around with this for a day now. Has anyone else tried it?

Two questions:
1: How do you pass a paramater to the server side event, e.g. if you wanted
to pass a selected value from a dropdownlist to the server side event? I cant
see a way of doing it. I have ended up just returning a big dataset to the
client javascript and filtering it there. I'd rather pass in a variable to
the server side code and only return the records I need.

2: I have used AJAX.Net to dynamically populate a dropdownlist without
postback based on what the user selects from another dropdownlist, works very
well, but when I do a postback afterwards the values added to the
dropdownlist are not "visible" to the server side code. This makes sense as
the changes were made on the client. How can I work around this? And does the
Client CallBack feature in ASP.Net 2.0 make this easier?

Thanks
N
Nov 19 '05 #1
12 1311
AJAX.NET is interesting. There are lots of ways to skin a cat. Jason Diamond
has rolled his own into a configuration-free version:

http://jason.diamond.name/weblog/200...ot-net-library

But you've got to realize this is an out of band callback. The server page
lifecycle isn't geting executed here, so lots of assumptions you could make
during a normal page postback don't hold. It's simply a RPC call.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have been toying around with this for a day now. Has anyone else
tried it?

Two questions:
1: How do you pass a paramater to the server side event, e.g. if you
wanted
to pass a selected value from a dropdownlist to the server side event?
I cant
see a way of doing it. I have ended up just returning a big dataset to
the
client javascript and filtering it there. I'd rather pass in a
variable to
the server side code and only return the records I need.
2: I have used AJAX.Net to dynamically populate a dropdownlist without
postback based on what the user selects from another dropdownlist,
works very well, but when I do a postback afterwards the values added
to the dropdownlist are not "visible" to the server side code. This
makes sense as the changes were made on the client. How can I work
around this? And does the Client CallBack feature in ASP.Net 2.0 make
this easier?

Thanks
N


Nov 19 '05 #2
NH
Do you know if Client CallBack in ASP.Net 2.0 is going to be better?

"Brock Allen" wrote:
AJAX.NET is interesting. There are lots of ways to skin a cat. Jason Diamond
has rolled his own into a configuration-free version:

http://jason.diamond.name/weblog/200...ot-net-library

But you've got to realize this is an out of band callback. The server page
lifecycle isn't geting executed here, so lots of assumptions you could make
during a normal page postback don't hold. It's simply a RPC call.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have been toying around with this for a day now. Has anyone else
tried it?

Two questions:
1: How do you pass a paramater to the server side event, e.g. if you
wanted
to pass a selected value from a dropdownlist to the server side event?
I cant
see a way of doing it. I have ended up just returning a big dataset to
the
client javascript and filtering it there. I'd rather pass in a
variable to
the server side code and only return the records I need.
2: I have used AJAX.Net to dynamically populate a dropdownlist without
postback based on what the user selects from another dropdownlist,
works very well, but when I do a postback afterwards the values added
to the dropdownlist are not "visible" to the server side code. This
makes sense as the changes were made on the client. How can I work
around this? And does the Client CallBack feature in ASP.Net 2.0 make
this easier?

Thanks
N


Nov 19 '05 #3
1) To pass the selected value from a dropdownlist, use the following

DropDownList:

<select id="dd1" name="dd1"></select>

Javascript to get the selected value

document.getElementById('dd1').value

If you are using an ASp:DropDownLIst, just right click and view source to
get the correct ID from the <SELECT> html control that is created.
I know when you using a control, it changes the name to be
[TAGNAME]_[CONTROLID], or something like that.

2) If you want to call the selects value from the Code Behind you have to
declare it, and set it to runat=server. so

in html

<select runat="server" id="dd1" name="dd1"></select>

in code behind

System.Web.UI.HtmlControls.HtmlSelect dd1

You can then get its value in the CodeBehind.

Now if you are populating this dropdown from the ClientSide script, it may
very well be empty when you post back.
So just check thats not the case.

Hope this helps.
XmlHttp ROCK (or AJAX as its now coined)

Here's the article that taught me this:
http://msdn.microsoft.com/asp.net/de...outrefresh.asp

Don't know about .NET 2.0, trying to play with that myself currently

"NH" <NH@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi,

I have been toying around with this for a day now. Has anyone else tried
it?

Two questions:
1: How do you pass a paramater to the server side event, e.g. if you
wanted
to pass a selected value from a dropdownlist to the server side event? I
cant
see a way of doing it. I have ended up just returning a big dataset to the
client javascript and filtering it there. I'd rather pass in a variable to
the server side code and only return the records I need.

2: I have used AJAX.Net to dynamically populate a dropdownlist without
postback based on what the user selects from another dropdownlist, works
very
well, but when I do a postback afterwards the values added to the
dropdownlist are not "visible" to the server side code. This makes sense
as
the changes were made on the client. How can I work around this? And does
the
Client CallBack feature in ASP.Net 2.0 make this easier?

Thanks
N

Nov 19 '05 #4
I've read the 2.0 CallBack is a lightweight compared to what is being
released by those building the libraries. That jives with Microsoft's
typical Notepad Edition release policies to put some 'thing' out and improve
it over time. The Catch-22 is waiting or adopting what others develop n.o.w.
and perhaps having to rebuild if and when Microsoft finally release an
elegant and powerful solution to warrant doing so.

The 2.0 Membership and Roles come to mind in this context as do Master Pages
and Themes.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
"NH" <NH@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Do you know if Client CallBack in ASP.Net 2.0 is going to be better?

"Brock Allen" wrote:
AJAX.NET is interesting. There are lots of ways to skin a cat. Jason
Diamond
has rolled his own into a configuration-free version:

http://jason.diamond.name/weblog/200...ot-net-library

But you've got to realize this is an out of band callback. The server
page
lifecycle isn't geting executed here, so lots of assumptions you could
make
during a normal page postback don't hold. It's simply a RPC call.

-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi,
>
> I have been toying around with this for a day now. Has anyone else
> tried it?
>
> Two questions:
> 1: How do you pass a paramater to the server side event, e.g. if you
> wanted
> to pass a selected value from a dropdownlist to the server side event?
> I cant
> see a way of doing it. I have ended up just returning a big dataset to
> the
> client javascript and filtering it there. I'd rather pass in a
> variable to
> the server side code and only return the records I need.
> 2: I have used AJAX.Net to dynamically populate a dropdownlist without
> postback based on what the user selects from another dropdownlist,
> works very well, but when I do a postback afterwards the values added
> to the dropdownlist are not "visible" to the server side code. This
> makes sense as the changes were made on the client. How can I work
> around this? And does the Client CallBack feature in ASP.Net 2.0 make
> this easier?
>
> Thanks
> N


Nov 19 '05 #5
MS is working on something called Atlas.

http://weblogs.asp.net/scottgu/archi...28/416185.aspx

-Brock
DevelopMentor
http://staff.develop.com/ballen
Do you know if Client CallBack in ASP.Net 2.0 is going to be better?

"Brock Allen" wrote:
AJAX.NET is interesting. There are lots of ways to skin a cat. Jason
Diamond has rolled his own into a configuration-free version:

http://jason.diamond.name/weblog/200...ot-net-library

But you've got to realize this is an out of band callback. The server
page lifecycle isn't geting executed here, so lots of assumptions you
could make during a normal page postback don't hold. It's simply a
RPC call.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I have been toying around with this for a day now. Has anyone else
tried it?

Two questions:
1: How do you pass a paramater to the server side event, e.g. if you
wanted
to pass a selected value from a dropdownlist to the server side
event?
I cant
see a way of doing it. I have ended up just returning a big dataset
to
the
client javascript and filtering it there. I'd rather pass in a
variable to
the server side code and only return the records I need.
2: I have used AJAX.Net to dynamically populate a dropdownlist
without
postback based on what the user selects from another dropdownlist,
works very well, but when I do a postback afterwards the values
added
to the dropdownlist are not "visible" to the server side code. This
makes sense as the changes were made on the client. How can I work
around this? And does the Client CallBack feature in ASP.Net 2.0
make
this easier?
Thanks
N


Nov 19 '05 #6
Guy's where can i get
information related to use of Ajax In ASP.Net

Nov 19 '05 #7
Mandar <oa*******@yahoo.com> ha scritto:
Guy's where can i get
information related to use of Ajax In ASP.Net


http://ajax.schwarz-interactive.de/c...e/default.aspx

--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
Nov 19 '05 #8
"Mandar" <oa*******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Guy's where can i get
information related to use of Ajax In ASP.Net


1) Launch your internet browser (Internet Explorer, FireFox, Netscape, Opera
etc)

2) Navigate to http://www.google.com

3) Enter the text below in the box:

Ajax ".NET"

4) Hit the button
Nov 19 '05 #9

Mark Rae wrote:
"Mandar" <oa*******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Guy's where can i get
information related to use of Ajax In ASP.Net


1) Launch your internet browser (Internet Explorer, FireFox, Netscape, Opera
etc)

2) Navigate to http://www.google.com

3) Enter the text below in the box:

Ajax ".NET"

4) Hit the button


Nice one but i ve tried it many times and many ways.

I want direct link to any web site dedicated to ajax with ASP.Net

Or any group.

Mandar Oak
( http://360.yahoo.com/oakmandar )

Nov 19 '05 #10

Mark Rae wrote:
"Mandar" <oa*******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Guy's where can i get
information related to use of Ajax In ASP.Net


1) Launch your internet browser (Internet Explorer, FireFox, Netscape, Opera
etc)

2) Navigate to http://www.google.com

3) Enter the text below in the box:

Ajax ".NET"

4) Hit the button


Nice one but i ve tried it many times and many ways.

I want direct link to any web site dedicated to ajax with ASP.Net

Or any group.

Mandar Oak
( http://360.yahoo.com/oakmandar )

Nov 19 '05 #11

"MatHertel" <Ma*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Have a look at
http://mathertel.devhost1.centron.ne...e/Default.aspx


Also check out ASP.NET Atlas

http://beta.asp.net/default.aspx?tabindex=7&tabid=47

David
Nov 19 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Yarco | last post: by
4 posts views Thread by bobzimuta | last post: by
reply views Thread by melledge | last post: by
1 post views Thread by www.web20developers.com | last post: by
10 posts views Thread by =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post: by
2 posts views Thread by soni2926 | last post: by
11 posts views Thread by =?Utf-8?B?R2VyaGFyZA==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.