Hi folks, I want to implement a shopping cart using Ajax Pro. How would You do it? Creating a DataTable on client side using AP seems like a good idea. But, how do i Bind this DataTable to eg. a ASP.Net repeater using JS? Is it even possible? Is it another way to display the content of the DataTable on the page? Thanks in advance!
Thanks for your answer, saud. But that links does not explain how to display the dataset/table on the page - its only an example with a alert box showings its content. I want to display the data in a table somehow.
Heh. I think this is not in the scope of ajax .net (pro). If you are already able to alert the content of your dataset/table, can you are as good as there I would say. You'll have to write javascript code which will loop through it and while you are looping (have fun) create each time a row. I think what you're asking is a pure javascript question?
Sven wrote: >Thanks for your answer, saud. But that links does not explain how to >display the dataset/table on the page - its only an example with a >alert box showings its content. I want to display the data in a table >somehow.
Yes, you are right. But is that the only solution? :) Say that i store all the data in a DataTable in a server side session. When the user clicks the "buy this item button" an XmlHttpRequest is made thats add a new row to the DataTable session variable. Then i want to display the whole DataTable for the user with eg a Repeater. Do you get it? Excuse me for my bad english. ;) Thanks for your help guys!
Manu Temmerman-Uyttenbroeck wrote: > Heh. I think this is not in the scope of ajax .net (pro). If you are > already able to alert the content of your dataset/table, can you are as > good as there I would say. > You'll have to write javascript code which will loop through it and > while you are looping (have fun) create each time a row. I think what > you're asking is a pure javascript question?
> Manu.
> Sven wrote:
> >Thanks for your answer, saud. But that links does not explain how to > >display the dataset/table on the page - its only an example with a > >alert box showings its content. I want to display the data in a table > >somehow.
> Yes, you are right. But is that the only solution? :) Say that i store > all the data in a DataTable in a server side session. When the user > clicks the "buy this item button" an XmlHttpRequest is made thats add a > new row to the DataTable session variable. Then i want to display the > whole DataTable for the user with eg a Repeater. Do you get it? Excuse > me for my bad english. ;) Thanks for your help guys!
> Manu Temmerman-Uyttenbroeck wrote: > > Heh. I think this is not in the scope of ajax .net (pro). If you are > > already able to alert the content of your dataset/table, can you are as > > good as there I would say. > > You'll have to write javascript code which will loop through it and > > while you are looping (have fun) create each time a row. I think what > > you're asking is a pure javascript question?
> > Manu.
> > Sven wrote:
> > >Thanks for your answer, saud. But that links does not explain how to > > >display the dataset/table on the page - its only an example with a > > >alert box showings its content. I want to display the data in a table > > >somehow.
-- .net noobie
You know this framework is not big enough for the two of us!
> On 2/22/06, Sven <sven.dahlstr...@gmail.com> wrote:
> > Yes, you are right. But is that the only solution? :) Say that i store > > all the data in a DataTable in a server side session. When the user > > clicks the "buy this item button" an XmlHttpRequest is made thats add a > > new row to the DataTable session variable. Then i want to display the > > whole DataTable for the user with eg a Repeater. Do you get it? Excuse > > me for my bad english. ;) Thanks for your help guys!
> > Manu Temmerman-Uyttenbroeck wrote: > > > Heh. I think this is not in the scope of ajax .net (pro). If you are > > > already able to alert the content of your dataset/table, can you are as > > > good as there I would say. > > > You'll have to write javascript code which will loop through it and > > > while you are looping (have fun) create each time a row. I think what > > > you're asking is a pure javascript question?
> > > Manu.
> > > Sven wrote:
> > > >Thanks for your answer, saud. But that links does not explain how to > > > >display the dataset/table on the page - its only an example with a > > > >alert box showings its content. I want to display the data in a table > > > >somehow.
> -- > .net noobie
> You know this framework is not big enough for the two of us!
-- .net noobie
You know this framework is not big enough for the two of us!
> > On 2/22/06, Sven <sven.dahlstr...@gmail.com> wrote:
> > > Yes, you are right. But is that the only solution? :) Say that i store > > > all the data in a DataTable in a server side session. When the user > > > clicks the "buy this item button" an XmlHttpRequest is made thats add a > > > new row to the DataTable session variable. Then i want to display the > > > whole DataTable for the user with eg a Repeater. Do you get it? Excuse > > > me for my bad english. ;) Thanks for your help guys!
> > > Manu Temmerman-Uyttenbroeck wrote: > > > > Heh. I think this is not in the scope of ajax .net (pro). If you are > > > > already able to alert the content of your dataset/table, can you are as > > > > good as there I would say. > > > > You'll have to write javascript code which will loop through it and > > > > while you are looping (have fun) create each time a row. I think what > > > > you're asking is a pure javascript question?
> > > > Manu.
> > > > Sven wrote:
> > > > >Thanks for your answer, saud. But that links does not explain how to > > > > >display the dataset/table on the page - its only an example with a > > > > >alert box showings its content. I want to display the data in a table > > > > >somehow.
> > -- > > .net noobie
> > You know this framework is not big enough for the two of us!
> -- > .net noobie
> You know this framework is not big enough for the two of us!
-- .net noobie
You know this framework is not big enough for the two of us!
> Yes, you are right. But is that the only solution? :) Say that i store > all the data in a DataTable in a server side session. When the user > clicks the "buy this item button" an XmlHttpRequest is made thats add a > new row to the DataTable session variable. Then i want to display the > whole DataTable for the user with eg a Repeater. Do you get it? Excuse > me for my bad english. ;) Thanks for your help guys!
Yes, with Ajax.NET and Ajax.NET Pro this is the Only Solution. You will always have to code Javascript to Build ClientSide Changes. Period.
If you wan't a Easy To Use ClientSide Updates without Postback Ajax.NET Pro is not the right solution for you.
You may take a look at ComfortASP, MagicAjax, Atlas or Anthem.
>On 2/22/06, Sven <sven.dahlstr...@gmail.com> wrote:
>>Yes, you are right. But is that the only solution? :) Say that i store >>all the data in a DataTable in a server side session. When the user >>clicks the "buy this item button" an XmlHttpRequest is made thats add a >>new row to the DataTable session variable. Then i want to display the >>whole DataTable for the user with eg a Repeater. Do you get it? Excuse >>me for my bad english. ;) Thanks for your help guys!
>>Manu Temmerman-Uyttenbroeck wrote:
>>>Heh. I think this is not in the scope of ajax .net (pro). If you are >>>already able to alert the content of your dataset/table, can you are as >>>good as there I would say. >>>You'll have to write javascript code which will loop through it and >>>while you are looping (have fun) create each time a row. I think what >>>you're asking is a pure javascript question?
>>>Manu.
>>>Sven wrote:
>>>>Thanks for your answer, saud. But that links does not explain how to >>>>display the dataset/table on the page - its only an example with a >>>>alert box showings its content. I want to display the data in a table >>>>somehow.
>-- >.net noobie
>You know this framework is not big enough for the two of us!
> >On 2/22/06, Sven <sven.dahlstr...@gmail.com> wrote:
> >>Yes, you are right. But is that the only solution? :) Say that i store > >>all the data in a DataTable in a server side session. When the user > >>clicks the "buy this item button" an XmlHttpRequest is made thats add a > >>new row to the DataTable session variable. Then i want to display the > >>whole DataTable for the user with eg a Repeater. Do you get it? Excuse > >>me for my bad english. ;) Thanks for your help guys!
> >>Manu Temmerman-Uyttenbroeck wrote:
> >>>Heh. I think this is not in the scope of ajax .net (pro). If you are > >>>already able to alert the content of your dataset/table, can you are as > >>>good as there I would say. > >>>You'll have to write javascript code which will loop through it and > >>>while you are looping (have fun) create each time a row. I think what > >>>you're asking is a pure javascript question?
> >>>Manu.
> >>>Sven wrote:
> >>>>Thanks for your answer, saud. But that links does not explain how to > >>>>display the dataset/table on the page - its only an example with a > >>>>alert box showings its content. I want to display the data in a table > >>>>somehow.
> >-- > >.net noobie
> >You know this framework is not big enough for the two of us!
-- .net noobie
You know this framework is not big enough for the two of us!
Ajax .NET probably takes more work to achieve what you want, but is probably the best in reducing amount of bytes transferred on callbacks (not the initial page load).
Ajax .NET is more for hard-core programmers. It's like porn. If you don't like hard-core porn, then you probably don't have the balls to use ajax .NET. I don't like hard-core porn.
>>Yes, you are right. But is that the only solution? :) Say that i store >>all the data in a DataTable in a server side session. When the user >>clicks the "buy this item button" an XmlHttpRequest is made thats add a >>new row to the DataTable session variable. Then i want to display the >>whole DataTable for the user with eg a Repeater. Do you get it? Excuse >>me for my bad english. ;) Thanks for your help guys!
>Yes, with Ajax.NET and Ajax.NET Pro this is the Only Solution. You will >always have to code Javascript to Build ClientSide Changes. Period.
>If you wan't a Easy To Use ClientSide Updates without Postback Ajax.NET >Pro is not the right solution for you.
>You may take a look at ComfortASP, MagicAjax, Atlas or Anthem.
Since one year I tell everybody to use Ajax.NET (Professional) only if you have some JavaScript expierience. If not you will feel bad, because the most you have learned using ASP.NET is something like DataGrid, DataRepeater and other nice web controls.
With Ajax.NET you will reduce the amount of bytes transfered from/to the server, you will save CPU usage on the serverm,... but you have to go different ways.
If you use other frameworks like Atlas, ComfortASP or MagicAjax you will have other problems (currently), the problem of memory leaks in Internet Explorer. My web application I'm working on most is running 24h the day, 7 days a week. The page will start once and never reloaded. Everything is running in that single page, and therefor memory leaks are very dangerous.
With Atlas you will have the same problem, maybe you will get some nice DataGrids that are using Atlas (AJAX) to refresh data, but if you want to personalize these controls you have to work on JavaScript code. No way around JavaScript!!!
Let us see what the future will bring us. I build several controls that are able to display DataTables or DataSets without memory leaks using Ajax.NET Professional. If you want I can put some examples online.
Regards, Michael
On 2/22/06, Manu Temmerman-Uyttenbroeck <m...@dimano.sk> wrote:
> Ajax .NET probably takes more work to achieve what you want, but is > probably the best in reducing amount of bytes transferred on callbacks > (not the initial page load).
> Ajax .NET is more for hard-core programmers. It's like porn. If you > don't like hard-core porn, then you probably don't have the balls to use > ajax .NET. I don't like hard-core porn.
> Ok that was my last post... sry...
> Albert Weinert wrote:
> >Sven schrieb:
> >>Yes, you are right. But is that the only solution? :) Say that i store > >>all the data in a DataTable in a server side session. When the user > >>clicks the "buy this item button" an XmlHttpRequest is made thats add a > >>new row to the DataTable session variable. Then i want to display the > >>whole DataTable for the user with eg a Repeater. Do you get it? Excuse > >>me for my bad english. ;) Thanks for your help guys!
> >Yes, with Ajax.NET and Ajax.NET Pro this is the Only Solution. You will > >always have to code Javascript to Build ClientSide Changes. Period.
> >If you wan't a Easy To Use ClientSide Updates without Postback Ajax.NET > >Pro is not the right solution for you.
> >You may take a look at ComfortASP, MagicAjax, Atlas or Anthem.
Michael Schwarz wrote: >That is a very nice answer...! Hm.
Yes indeed a very nice answer *ahem*. Sorry Michael I guess I'm in a bad mood. Yes I shouldn't put my anger in this list, so sorry...
>Since one year I tell everybody to use Ajax.NET (Professional) only if >you have some JavaScript expierience. If not you will feel bad, >because the most you have learned using ASP.NET is something like >DataGrid, DataRepeater and other nice web controls.
I think most people don't really know that when they use Ajax.NET (pro) they need js experience. I mean that they need more js experience then with some other frameworks.
>With Ajax.NET you will reduce the amount of bytes transfered from/to >the server, you will save CPU usage on the serverm,... but you have to >go different ways.
That's what I wrote I guess. It's probably a better (if not the best) ajax framework for asp then others. Ajax .NET got a lot of good publicity. Given this + the fact that ajax is the web buzz word of the moment I think a lot of people jump into it (just like I did) without really knowing what is waiting them. And I think for those people, for people who want to go the easy way, they should use another framework.
>If you use other frameworks like Atlas, ComfortASP or MagicAjax you >will have other problems (currently), the problem of memory leaks in >Internet Explorer. My web application I'm working on most is running >24h the day, 7 days a week. The page will start once and never >reloaded. Everything is running in that single page, and therefor >memory leaks are very dangerous.
Hm. Could you explain why other frameworks then ajax .net could have memory leaks in IE and ajax .net itself not? I would like to understand why. Is it cause of the updating of dom elements by replacing their innerHTML? Are there other problems you can think of?
>With Atlas you will have the same problem, maybe you will get some >nice DataGrids that are using Atlas (AJAX) to refresh data, but if you >want to personalize these controls you have to work on JavaScript >code. No way around JavaScript!!!
True there is no way around javascript. But there is a way to reduce the amount you have to write.
>Let us see what the future will bring us. I build several controls >that are able to display DataTables or DataSets without memory leaks >using Ajax.NET Professional. If you want I can put some examples >online.
>On 2/22/06, Manu Temmerman-Uyttenbroeck <m...@dimano.sk> wrote:
>>Ajax .NET probably takes more work to achieve what you want, but is >>probably the best in reducing amount of bytes transferred on callbacks >>(not the initial page load).
>>Ajax .NET is more for hard-core programmers. It's like porn. If you >>don't like hard-core porn, then you probably don't have the balls to use >>ajax .NET. I don't like hard-core porn.
>>Ok that was my last post... sry...
>>Albert Weinert wrote:
>>>Sven schrieb:
>>>>Yes, you are right. But is that the only solution? :) Say that i store >>>>all the data in a DataTable in a server side session. When the user >>>>clicks the "buy this item button" an XmlHttpRequest is made thats add a >>>>new row to the DataTable session variable. Then i want to display the >>>>whole DataTable for the user with eg a Repeater. Do you get it? Excuse >>>>me for my bad english. ;) Thanks for your help guys!
>>>Yes, with Ajax.NET and Ajax.NET Pro this is the Only Solution. You will >>>always have to code Javascript to Build ClientSide Changes. Period.
>>>If you wan't a Easy To Use ClientSide Updates without Postback Ajax.NET >>>Pro is not the right solution for you.
>>>You may take a look at ComfortASP, MagicAjax, Atlas or Anthem.
>Then i want to display the whole DataTable for the user with eg a Repeater.
Sven,
The problem here is that a repeater is a Server control. It's rendered on the server, and then pushed to the client side as HTML. So, there really isn't any way to "Use" a repeater with Ajax.
But, then, just as I say that, an idea pops into my head.
***SERVER SIDE*** <AjaxPro.AjaxMethod()> _ Public Function getDG() As String
Dim ds As New DataSet 'Fill the dataset however you want...
Dim DataGrid1 As New DataGrid DataGrid1.DataSource = ds DataGrid1.DataBind()
Dim SB As New System.Text.StringBuilder Dim SW As New System.io.StringWriter(SB) Dim htmlTW As New HtmlTextWriter(SW)
This really doesn't solve the issue of reducing the bytes sent back and forth between a server, but it does allow "databinding" to a repeater or some other data-aware server control, and then flushing the data back to the client. I also haven't dealt with server side templates, or anything like that with repeaters. You're on your own for that!
> With Ajax.NET you will reduce the amount of bytes transfered from/to > the server, you will save CPU usage on the serverm,... but you have to > go different ways.
On 2/22/06, Manu Temmerman-Uyttenbroeck <m...@dimano.sk> wrote:
> Michael Schwarz wrote:
> >That is a very nice answer...! Hm.
[...]
> I think most people don't really know that when they use Ajax.NET (pro) > they need js experience. I mean that they need more js experience then > with some other frameworks.
Yes, but if you want to extend other frameworks you have to write JavaScript code, have a look inside Atlas, if you want to add your own behaviours you have to write JavaScript.
> >If you use other frameworks like Atlas, ComfortASP or MagicAjax you > >will have other problems (currently), the problem of memory leaks in > >Internet Explorer. My web application I'm working on most is running > >24h the day, 7 days a week. The page will start once and never > >reloaded. Everything is running in that single page, and therefor > >memory leaks are very dangerous.
> Hm. Could you explain why other frameworks then ajax .net could have > memory leaks in IE and ajax .net itself not? I would like to understand > why. Is it cause of the updating of dom elements by replacing their > innerHTML?
Because the most are using .innerHTML, yes. And if you add some more features like mouse or keyboard events you will have too many events that may be not destroyed correctly. If someone knows an AJAX framework where I do not have memory leak problems, PLEASE tell me the name or where I can download it!!!!!
> >Then i want to display the whole DataTable for the user with eg a Repeater.
> Sven,
> The problem here is that a repeater is a Server control. It's rendered > on the server, and then pushed to the client side as HTML. So, there > really isn't any way to "Use" a repeater with Ajax.
> But, then, just as I say that, an idea pops into my head.
> ***SERVER SIDE*** > <AjaxPro.AjaxMethod()> _ > Public Function getDG() As String
> Dim ds As New DataSet > 'Fill the dataset however you want...
> Dim DataGrid1 As New DataGrid > DataGrid1.DataSource = ds > DataGrid1.DataBind()
> Dim SB As New System.Text.StringBuilder > Dim SW As New System.io.StringWriter(SB) > Dim htmlTW As New HtmlTextWriter(SW)
> This really doesn't solve the issue of reducing the bytes sent back and > forth between a server, but it does allow "databinding" to a repeater > or some other data-aware server control, and then flushing the data > back to the client. I also haven't dealt with server side templates, > or anything like that with repeaters. You're on your own for that!
> > With Ajax.NET you will reduce the amount of bytes transfered from/to > > the server, you will save CPU usage on the serverm,... but you have to > > go different ways.
Right. This wasn't a very detailed example. More of a demonstration to show how it *could* be done.
But, you might be able to register client side scripts (or something like that) using this method.
I don't think I'll ever use this technique, so I don't have much interest in exploring it further. Just thought I'd contribute to the community a little. :)
>Because the most are using .innerHTML, yes. And if you add some more >features like mouse or keyboard events you will have too many events >that may be not destroyed correctly. If someone knows an AJAX >framework where I do not have memory leak problems, PLEASE tell me the >name or where I can download it!!!!!
Aha so you are also saying that Ajax .NET (pro) _could_ have some memory leaks? I'm using anthem. Here you can find the last release: http://sourceforge.net/project/showfiles.php?group_id=151897 As far as I remember we didn't have any reports on memory leaks. But this could be due to the fact that it's not (yet) used by many people? Or that there is not so much javascript? innerHTML is fully used though.
Anyway, did you maybe already try it? Will you maybe have a look at it?
can you send me the latest source code package...? sourceforge.net is currently very slow, I don't know why. The main problems concerning memory leaks comes from wrong use of the frameworks. If you are talking about AJAX framworks we have to separate the profi frameworks from the ASP.NET (express) developer frameworks, like ComfortASP, ... As I can remember Anthem is nearly the same as Ajax.NET, maybe with less features, I don't know, will have a look on it.
Regards, Michael
On 2/23/06, Manu Temmerman-Uyttenbroeck <m...@dimano.sk> wrote:
> >Because the most are using .innerHTML, yes. And if you add some more > >features like mouse or keyboard events you will have too many events > >that may be not destroyed correctly. If someone knows an AJAX > >framework where I do not have memory leak problems, PLEASE tell me the > >name or where I can download it!!!!!
> Aha so you are also saying that Ajax .NET (pro) _could_ have some memory > leaks? > I'm using anthem. Here you can find the last release: > http://sourceforge.net/project/showfiles.php?group_id=151897 > As far as I remember we didn't have any reports on memory leaks. > But this could be due to the fact that it's not (yet) used by many > people? Or that there is not so much javascript? innerHTML is fully used > though.
> Anyway, did you maybe already try it? > Will you maybe have a look at it?