Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Wednesday, March 28, 2012

How do I UnitTest My Atlas component

Hi,

Can anyone guide me how I can unit test my atlas component. Here is the scenario
I have existing app which is using javascript ...now i was thinking about removing it
and implement atlas functionality. However this gives me opportunity to write test
cases. Can someone tell me if MSTS has inbuilt functionality for this or which other
way i can test my component built in atlas. Will Nunitasp or Nunit work?

Thank you

VSTS does not have built-in support for JavaScript. Neither does NUnit. You might be able to use NUnitAsp, but I would recommend JsUnit:http://www.edwardh.com/jsunit/

-Mike

How do I start using AJAX controls on an existing project?

I went through the video tutorial where it had me open a template project, then add a confirmbuttonextender which worked very well. I noticed when i opened the template on the aspx page by following the videos instructions, it already contained a scriptmanager. On my existing poject I do the same steps to setup the button control, only this time i manually added a scriptmanager, but my button does nothing. Is there something i have to do to my project to enable it to Use the AJAX controls or something I have to do to the scriptmanager?

jwkeenan:

I went through the video tutorial where it had me open a template project, then add a confirmbuttonextender which worked very well. I noticed when i opened the template on the aspx page by following the videos instructions, it already contained a scriptmanager. On my existing poject I do the same steps to setup the button control, only this time i manually added a scriptmanager, but my button does nothing. Is there something i have to do to my project to enable it to Use the AJAX controls or something I have to do to the scriptmanager?

also there is a confiuration.

the best way to start using AJAX controls on an existing project . open an ASP.NET AJAX-Enabled Web Site . then add the pages in the existing project.

Regards.


ok i opened a new asp.net ajax web enabled site and added all the items form my other project, but the control still does nothing. Any other ideas i can try?


Hi, I try this way several times. I had several project and do this way.

note: don't add the web.config file from the exist project.

is ther an error appear to you?


It works! I was reloading my old web config file. Thanks for your help.


I started by...

Downloaded the ASP.NET AJAX Control Toolkit and load it's sample website into an instance of vs2005. You can run the sample website in debug mode and copy/paste desired code segments directly into your application. After you get the hang of specific controls then you can pick them directly from your AJAX Control Toolkit tab on the tools browser. This process will also helps in understanding the usage of the update panel.

PS - check out my schools site at:www.jeromessite.com.

If you like the way it works the let me know and I will direct you to the source code.

Thanks,

Jerome

Monday, March 26, 2012

How do I distinguish between AJAX postback and regular postback?

I just installed Ajax 1.0 with VS2005 SP1 and am trying to add AJAX to an existing site.


However, the site right now has fairly complex code in the master page defined in Page_init, Page_load, and PreRender events. I'd really like to skip those calls if it is an AJAX post back. I looked at the Page class and found IsCallBack and IsPostBack, both of which will not be triggered by an AJAX post back.

I thought of using a hidden variable (something like AJAXCall) and using a Javascript to set a value with every control that can trigger an AJAX postback, but that seems like not the right way to do it.

Does anyone know how to tell the difference between the two, or is it possible to skip Page_init, Page_load, and PreRender events with an AJAX call?

Thanks,

Ming

Yes you can, but you have to use UpdatePanel.

Girijesh:

Yes you can, but you have to use UpdatePanel.

I have tried the following setups with no success. In the master page, I included my script manager. Then I had an update panel with a button which updates a label with the system time. This takes about 10 seconds to update. The debugger tells me it executes Page_Load, Page_Init and PreRender.

Then I tried to include an update panel with a button inside page that inherits the master page, it also goes into all 3 methods. I tried this with my existing website, as well as a brand new AJAX enabled website.

Any ideas?

Thanks,


Ming


Hi Ming,
You can use ScriptManager.IsInAsyncPostBack property to distinguish them.
Hope this helps.

Raymond Wen - MSFT:

Hi Ming,
You can use ScriptManager.IsInAsyncPostBack property to distinguish them.
Hope this helps.

It worked like a charm. Thanks for telling me exactly what I was looking for.

Thanks!

How do I change the TabControl background images?

Hi, Does anyone know how I can change the folder images in an AJAX 1.0 TabContainer? I had recently posted in hopes of finding an existing CssClass, but no luck. Is it possible to change these images? I want to swap out that folder image that contains the yellow stripe header.

Thanks! Jason

Currently they are hard-bound to tab implementation. If you could open a work itemhttp://www.codeplex.com/AtlasControlToolkit/WorkItem/Create.aspx we will investigate possible solutions like moving the tabs.css file and the images out of the control code so that it can be easily configured by end users.

The owner of the TabPanel and Calendar extenders has just posted a blog that documents how to customize a tabpanel and calendar. There is a cssclass property that can be set that contains the settings for the different classes. Seehttp://community.bennettadelson.com/blogs/rbuckton/archive/2007/02/02/Skinning-model-for-Calendar-and-Tabs-in-Ajax-Control-Toolkit.aspx.

Saturday, March 24, 2012

How do I add ATLAS feature to an existing ASP.NET 2.0 Web Application?

Hi all,

Can some one provide me the steps needed to add ATLAS features to an existing ASP.NET 2.0 Web Application?

I saw the video "Developing ASP.NET 2.0 Applications using "Atlas"" byScott Guthriewhere he explained how to add ATLAS features to the To-do application. But to start with, he created anATLAS WEBSITE PROJECTand started modifying it.

I see that the config file is very important for ATLAS to function correctly. What other dependency is there? How do I create an ATLAS enabled "Web application"?

Most importantly, if i have an ASP.NET 2.0 Web Application, how do i add ATLAS features to it?

Thankx in advance

Jacob

from other thread:

ScottGu:

The easiest approach might be to create a newweb-site using the Atlas template, and then copy the resultingAtlas.dll into the \bin directory of your existing application andintegrate the web.config file changes in as well. Then you should begood to go.

Hope this helps,

Scott


hello.

well, you must:

1. add the atlas dll to the bin folder and
2. add the necessary entries to the web.config file

note that you can get the dll from the installation folder (normally, program files\microsoft asp.ent\atlas\v...\atlas and you can also see the necessary web.config entries by opening the web.config file that exists on that dir.


Hi luis,

Thankx for the information. However, this i what is had figured too. I had tried this earlier but some how, it did not seem to be working.

I was looking to see if some one has already done this, and can specify the detailed steps, including the web.config changes etc..

did you ever try to do this? Were u able to make it work? I wanted to use the new 'atlas' control toolkit. Do u think it would be easy to integrate this to an existing web application?

What difference are there between an ASP.NET 2.0 Web Application and ATLAS Website Project provided by the visual studio? Is that only the web.config which differs?

thankx

Jacob

How can I use ASP.NET AJAX Toolkit Controls in an existing ASP.NET 2.0 website?

Hello All!

Trust you guys are doing well. I have a existing ASP.NET 2.0 website to which I would like to add some ASP.NET AJAX Toolkit Controls. How can I do this? I sincerely do appreciate your time and assistance. Thank you.

Regards,

Mohammed

Here's a video you can watch on this subject:

http://www.asp.net/learn/ajax-videos/video-81.aspx

and here's the documentation:

http://asp.net/ajax/documentation/live/InstallingASPNETAJAX.aspx



Hello ca8msm!

Thank you so very much for your assistance.

Take care,

Mohammed

How can i use AJAX Control Toolkit in legacy ASP?

Hello to all,

like many i am new to AJAX and i am willing to dig in because i need to modernize an existing web application with pages in both in ASP (80%) and ASP.NET (20%) pages. I know the straightforward answer should be migrate all your asp in asp.net but unfortunately it's not an option.

Basically, what i am trying to do is to display a dragable panel on top those existing pages. The panel should be able to display information about the page. The user could also add new content in this panel and save seamlessly with AJAX.

First of all, if i want to reuse the widget from the toolkit, how can load them in ASP pages ?

Also, i read you can use the Ajax client library in non ASP.net. What does it mean ? I've look at it and it does seem very friendly. Any help would be appreciated.

Lastly, is it possible to have widget load from ASP integrated with an ASP.NET back-end for server side processing?


Thanks in advance for helping me out. I really would like to use this technology.


Olivier.

Well i got a solution that worked perfect for me: I am using Dojo. It's much more flexible in non ASP world and the toolkit set much richer as of now.