Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Wednesday, March 28, 2012

AJAX Baby Steps - removing an item

i am working on my first little ajax project.

Basically i have no idea how to start. I created a AJAX enabled website and i have a simple page on there that basically has a list of items taken from a Class thats stored in the session.

So I have

1 Gridview that bases its DataSource to a Dataset i create from a object (just a class that contains an array list)

2. I have methods in place to loop through the array list, create a datatable and bind it to the gridview

3. I have a method that also removes a selected item from a dataset and refreshes the gridview its a "remove" button.

I would like to have AJAX handle the removal of items (for now, eventually i want the whole thing ajax enabled) but just to start i want to just activate my Remove method from ajax.

But i dont know where to go from here.

So what do i have to do to call my method via AJAX ?

Any advice or help appreciated!

thanks

mcm

well i seem to have figured it out although i dont know what i did or how it works!

I added the ScriptManager tag to the page.

I added an UpdatePanel surrounding my Gridview,

and now my REMOVE buttons work without postbacks!

Holy Momma! How did it do it?!? I thought i'd have to be writing javascript and hooking into new events , etc.

is it REALLY all this easy?

mcm


Yep, it can really be that easy. caveat, though; the UpdatePanels can get pretty heavy in terms of resource requirements if you use them extensively, and there are also issues with certain combinations of controls (witness the volume on the forum of "Update panel and my..." posts. For simple things like you're describing, they work very well, though.

great! So now that i have seen how easy it "can be". I do have a couple more questions.

I created a sample AJAX enabled site to test this bin and it works GREAT im so impressed with myself.

But how complicated is it going to be to make this a component. My idea for the site is to use Master Pages (another first for me)

and down the left side this "component" will sit. I still dont know wether to make it a component or just a content page.

There will be a repeater or a formView on the right with products to add to the bin. I want those to be ajax enabled too. Is it hard to make different elements in different content pages "speak" to each other? Really all im doing (as stated in the first post) is adding items to a Collection stored in a Session Variable (using a facade pattern with a SessionManager class)

Also. I am using the new Web Application templates to build my stuff (from ScottGu's blogs) Can i switch this AJAX enabled site to be a WEb Application and keep the functionality?

thanks,

mcm

Monday, March 26, 2012

Ajax AutoCompleteExtender

Hello!

I have a problem about AjaxAutoComplete.

In my project,I have no error till I put three AutoCompleteExtender.

But when more than 3, I meet "Operation Aborted" MessageBox.

Please help me if you can be quickly.

Thanks

For regards,

Hi,

Without any valuable information, it is hard to say where the problem lies on.

Please provide any more information,eg. any code of this.

Thanks!


Hello!

many many thanks for your reply!

Please forgive me not for reply a once.i find your reply just now.

In my project,there are 3 pages.first page is list page .from this page ,we can go second page to entry data into DB. and then from first page,we can also third page to edit data from DB.

In second page and third page,I used AutoCompleteExtender.

In these pages ,I need to use 5 AutoCompleteExtender .So i used 5.But I found " Operation Aborted" Message when I went more than 3 times these pages .that is ,first I entry,and second time I edit and then third time i entry and up to this time i have no error.but forth time i edit ,In that time Edit Page come on but same time i find "Operation Aborted" MessageBox ,After that,I find "The Page cannot be display".

Some Codes In Pages

<asp:TextBoxid="txt1"runat="server" cssclass="MagicColText"width="30px"maxlength="3"></asp:TextBox>

<ajaxToolkit:AutoCompleteExtenderid="Complete1"CompletionSetCount="10"runat="server"TargetControlID="txt1"ServicePath="WebService.asmx"ServiceMethod="GetCompletion1"MinimumPrefixLength="1"CompletionInterval="1000"EnableCaching="true"></ajaxToolkit:AutoCompleteExtender>

<asp:TextBoxid="txt2"runat="server" cssclass="MagicColText"width="30px"maxlength="3"></asp:TextBox>

<ajaxToolkit:AutoCompleteExtenderid="Complete2"CompletionSetCount="10"runat="server"TargetControlID="txt2"ServicePath="WebService.asmx"ServiceMethod="GetCompletion2"MinimumPrefixLength="1"CompletionInterval="2000"EnableCaching="true"></ajaxToolkit:AutoCompleteExtender>

<asp:TextBoxid="txt3"runat="server" cssclass="MagicColText"width="30px"maxlength="3"></asp:TextBox>

<ajaxToolkit:AutoCompleteExtenderid="Complete3"CompletionSetCount="10"runat="server"TargetControlID="txt3"ServicePath="WebService.asmx"ServiceMethod="GetCompletion3"MinimumPrefixLength="1"CompletionInterval=3000"EnableCaching="true"></ajaxToolkit:AutoCompleteExtender>

and so on....

I used till 5.I don't find error till 3 .

IS there any rules in property of AutoCompleteExtender?

and then i don't understand CompletionInterval!

pls help me!

many thanks!

Best regards,

ajax animation extender pls help

Hello all I had designed my website with help of ajax extensions in that project i had designed master page and this page inherits some another pages but whenever user goes inside the link i want to disable some of the links which presents on the master page .

i am using animation extender ,when animation flyout on button clik then i want only animated div tag and disable all background page.

I want to use same functionality as asp.net forum uses when user click's on select tags button .

whenever uses select that topic only animation is enabled on the page and background is disable

you can see this functionality by posting a query on asp.net fourm

thank you

ravi amber

Hi Ravi amber,

I'm failed to get clear enough with your question. So would you please explain what you want more clearly? Thanks.

ravi.ambar:

but whenever user goes inside the link i want to disable some of the links which presents on the master page .

i am using animation extender ,when animation flyout on button clik then i want only animated div tag and disable all background page.

I want to use same functionality as asp.net forum uses when user click's on select tags button .

What are these really mean??

Best regards,

Jonathan

AJAX and WinPE 2.0

What we are trying to accomplish is have the PE environment come up and though a VB6 app launch a web browser via IEFrame.ocx. The C#.net web project (ASP.NET 2.0) loads but none of the AJAX extenders seem to. Does anyone know of a way to get AJAX to run in this environment?

Configure your AJAX

http://asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx


It is configured. The app runs just fine on full OS's like XP and vista. I am having difficulties with PE 2.0.


Hi,

Ajax need javascript &XMLHTTP,May your PEenvironment don't enable javascript or not support XMLHTTP.

Best Regards,

AJAX and WebApplication Project Type

I have a VS2003 Web project I converted to VS2005 sp1 WebApplication project (not WebSite project). I wanted to add AJAX to this web application so I followed the directions outlined in the video on the AJAX site. I added all the entries to the web.config without any trouble. I added the ScriptManager control to one of the pages and an UpdatePanel. I also had to set a reference tosystem.web.ui. System.Web.Extensions However, when I try to drag some of the asp.net controls already on the page (drop down boxes) to the update panel, it does not seem to be accepting them. They are not "dropping into" the update panel. The panel does not highlight when I drag the controls over it.

What am I missing?

EDIT: The reference I set was System.Web.Extensions...not web.ui.

Apart from working with the Designer, have you tried working around in the HTML to see if its working?

Wrap your controls with the UpdatePanel and see if the page is working.

-Thanks


It's hard to tell without seeing the web.config, etc. The easiest way (and the method I used) is to create a new project, and view the differences between the web.config files and references.

I copied all of my project-specific settings (the ones that I added myself) to the web.config for the new project, then copied the resulting file to my actual upgraded project. It worked for me!

Just be sure to make backup copies of the old web.config, just in case you need to revert.


ravivb.net:

Apart from working with the Designer, have you tried working around in the HTML to see if its working?

Wrap your controls with the UpdatePanel and see if the page is working.

-Thanks

I have not tried that appraoch yet, however I will give it a try. thank you for your response.


ps2goat:

It's hard to tell without seeing the web.config, etc. The easiest way (and the method I used) is to create a new project, and view the differences between the web.config files and references.

I copied all of my project-specific settings (the ones that I added myself) to the web.config for the new project, then copied the resulting file to my actual upgraded project. It worked for me!

Just be sure to make backup copies of the old web.config, just in case you need to revert.

I will give this a try. I originally did it the other way around (copied web.config entries from the emtpy project to my project). Thank you for the response.


wjdunn3:

ravivb.net:

Apart from working with the Designer, have you tried working around in the HTML to see if its working?

Wrap your controls with the UpdatePanel and see if the page is working.

-Thanks

I have not tried that appraoch yet, however I will give it a try. thank you for your response.

This approach worked. I added the Script Manager and Update Panel to the Page then switched to HTML view. I moved the Script Manager tags to be just under the first FORM tag. I wrapped the code I wanted in the Update Panel tags and *important part* ContentTemplate tags.

I don't know why it does not work within the designer...I will have to try and figure that out another day. Thanks all for the quick responses.

Saturday, March 24, 2012

Ajax And Web Reference

hi

is it possible to refer by web service to my ajax control library component AutoCompleteExtender1, if i add asmx page directly to project solution i'm able to give the service path and service method to this component.

i have a separate web service running which is communicating with my SQL Server 2000

so in my solution i added the webservice using add App_WebReferences, sohow to assign my service path and service method to the extender.

thanks in advance.

happy dotnetting.

bye

jags

Hi jags,

It isn't possible to connect to an external webservice. So one solution is. Create a webservice (WebserviceA) within your solution where your website resides. In the code for WebserviceA you make a connection (webreference like you are used to) to WebserviceB (which is outside your domain). Al the requests that are going to webserviceA are passed through to webserviceB which will return the value to webserviceA and webserviceA will return it to your browser. Hope this helps!

Regards,


thanks dennis, i'll be travelling for the next few days.i'll try this and will get back to you at the earliest.

Wednesday, March 21, 2012

Ajax and debugging. Is Edit & Continue possible?

Hi!

I'm a newbie in Ajax. I'm using VS2005 and vb.net in AJAX project.

Is it possible to debug and modify the source code (edit & continue).

Because I can't!

Can you help me?

Thx!

Yes if you use ASP.NET WebApplication project instead of a web site project you will be able to use edit and continue. To create a new ASp.NET AJAX web application project you need to have VS 2005 SP1. You can create a new web application from the New Project Dialog.

AJAX and Content Pages require MasterPage open stil an Issue in RC1?

Hi,

I have just updated my project to RC1 from BETA2 and it appears that the problem with content pages still exists. When I have a content page open without having the master page open I get a build compilation error on items such as ScriptManager and UpdatePanel. Is everyone else still experiencing this? Or is there something I've missed in my setup and migration? If this issue does exist for everyone, is this issue going to be fixed for the Full Release Version of Microsoft Ajax Extensions?

Thanks

Andrew

Sorry all,

I think I can answer my own post. If found a Post on Scott Guthries Blog which has resolved the problem for me. At the base of the post, Scott instructs users to delete the cached schema files for VS2005 in order to enable Intellisense correctly. The post link ishttp://weblogs.asp.net/scottgu/archive/2006/12/15/asp-net-ajax-1-0-release-candidate-now-available.aspx

Cheers

Andrew


Hi Andrew,

I have same problem as yours, and I did what Scott suggests. But I still get build compliation error. Can you give me some hints.

Thanks a lot,

Sean


Hi Sean,

I found that I needed to close down VS05, delete the schemas from the following directory (Windows XP)

C:\Documents and Settings\[Insert User Name Here]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas

and then go back into VS05 and rebuild the project/site.

Give this a go and let me know how you get on.

Cheers

Andrew


Thanks Andrew,

I did exactly what you instructed and I even re-installed RC, but I still get error. Actually, I should say I get build error from page source view, but no error building from design view. I am wondering if this is bug in RC. Did you have same problem?

Best,

Sean


Hi Sean,

sorry I didn't have the same problem I found once I had followed the steps in the readme and cleared out my schemes I was fine.

ASP.net AJAX v1.0 has now been officially released so why not download the full build and update your project and see if your issue is fixed? I can't upgrade mine at the mo, 'cos I 'm at home and the apps I'm working on are work ones. Will do them in the morning. Let me know how you get on.

Cheers

Andrew


Thanks Andrew,

Actually, I am using AJAX 1.0 officially release. For time being, I just let it go since I can build from design view. And I got one more question, after migrating to AJAX 1.0, the TAB not working properly, for example, click checkbox to display and panel, but the cursor will go to top of page. when I use 'Atlas', I can use Focus( ) to force cursor stay on the check box. But now the Focus not working anymore, Do you have any idea?

Thanks,

Sean


Hi Sean,

how are you getting on with this? One thing that might be worth looking at to clear your issue with building in code view is to create a blank ajax site and then copy the web.config to your site you're having a problem with and put in your appSettings and connection strings etc from your original web.config into the new web.config file.

As for the tab issue can elaborate or provide a sample and I'll see if I can replicate the issue? I haven't had any issues with my current project, the installation of version 1.0 went fine. I have a page which has some calculations updating through AJAX and would expect to see a similar issue with tab but don't.

Cheers

Andrew

AJAX And Content Pages

Hi to all..

I have the binaries of ajax control toolkit i do not have installed ajax extensions. then how to use these features of ajax in my project - how to add reference of it?

I have designed a master page and all the other pages - that are content pages, so how to use AJAX control toolkit in content pages.

Hi there,

first of all you have to install the Ajax Extension package (MSI), then from your project, you have to add a reference to AjaxControlToolkit assembly. Finally, select the toolbox window, right click on there, add a new tab, for instance "Ajax Toolkit", and then right click on this new tab and select the "Choose Items" option, at this point a new window will be opened so then select the "Browse" button and click on the AjaxControlToolkit assembly and that's all. You will see the whole AjaxControlToolkit on your toolbox window.

I hope it helps.

Regards,

Fernando.



hi,,

thank you for give me suggession.

i have already done that thing but the problem is when i put <asp:ScriptManager>.. inside the content page the following build error comes there "unknown type <asp:scriptmanager>"

and second thing is

if it runs successfully then there is an error in web browser like in status bar of browser "done, But with errors..."

sys. - undefined.

these errors i've faces so far so please guild for that also..

Thank you

Bhavin