Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Wednesday, March 28, 2012

How do i use Tabs in Ajax in asp.net application..

Hi, i have a asp.net web application which is production... and the client wants us to display the data using the userid... right now i am using a datagrid in a simple aspx page.. but since the user has asked for that request.. i want to have 5 (tabs each for a user Id) and then display the datagrid on it... how can i do this is an existing aspx page.

I have downloaded the ajax tool kit and i dont know from where to start... by data grid is simple... just displaying the data using.. a sql query and there are few links in the datagrids to navigates to other pages...

So can I use Ajax just for one page,,, and is there anything that i need to know that will hamper production when using Ajax..

any help ,ideas and code will be greatly appreciated

Regards

Karen

You can easily only use ajax on one page, and creating the tab thing should be quite simple. There is nothing that will tamper production, since ajax is essentially an extra dll that goes in the bin folder, and a couple of additions to web.config. If I was you I would just go ahead and get my feet wet. There are some excellent getting started tutorials on this site. Just click the Ajax menu at the top of the page.

Good luck!

/Klaus


Thank you Klaus i will look into it. can you pls give me some link to it..

Regards

Karen


Hi,

Thank you for your post!

It seems that you are really a newbie to AJAX and javascript,this is a good start point for your learning:ASP.NET AJAX Roadmap

And this is a good point to start with Toolkit:http://www.asp.net/ajax/ajaxcontroltoolkit/samples/

And in my opinion, <ASP.NET AJAX in action> is a decent book to learn ASP.NET AJAX.

If you have further questions ,let me know.

Best Regards,


Jin,

Thanks for the link... and yeah i am newbie to Ajax and javascript... i had worked on tabs when i was working on VB.6 and then it was so easy then and that was 3 yrs ago.

regards,

Karen

How do I know the AJAX load is complete?

I have several webservice proxies set up and some event wiring that is occurring in the Application.Load client side Ajax event. Is there a property somewhere that I can query to determine if the loading of all Ajax controls and initialization is setup and complete.

I have a client side event that displays a modal popup using a WebService proxy. But when the users click on the button before the Ajax initialization is complete there is a script error. Right now I am checking typeof( WebService.Proxy) to "undefined" to know whether I should execute the method, but a variable I could query would be much better.

Would it be preferable to disable the button by default -- then in app load, enable it?


That is a good suggestion. I could use that method in some situations. However, some of my events are mouseover events and link click events. There will be several on the page and it would be beneficial to have a single interface to consistently determine if I could execute my event script. From the user experience side, most users won't click a button until Ajax has finished loading anyway and I'd hate to distract them with UI elements flickering when they are activated.

In some cases, I would like set a timeout that could poll the app load complete bool and continue firing the event.


I just noticed in Beta 2 the external script references are loaded asychronously. This presses my need for a "done loading javascript file" message, or do you suggest putting this "check" in each javascript object file?


The way the asychronous loading feature is designed, you can be assured that all controls and instantiated and initialized by the time you get the Sys.Application object's "load" event. It is during the processing of the "init" event that all the asynchronous loading work is completed. To ensure that a piece of your code runs AFTER this, you can do the following:

Sys.Application.add_load(function() { anotherFunctionCall(); });

The code above ensures that you can run something with the confidence that all the controls, scripts, etc. have been loaded and initialized.


Preferably you would hookup your event handlers from pageLoad (aka app load). That way, if the user does something like mouse over before the page is ready, nothing happens. No need to check for something being loaded or not.


Thanks, that makes sense. I'm trying to use the extender style javascript object to wire up the event handlers and I think it is going to work out well.

Monday, March 26, 2012

How do I get rid of System.Web.Extensions ?

Hi

I have installed the AJAX toolkit and framework. But now, for some reasons, it is conflicting with my application.

I have uninstall VS and reinstall it, and the AJAX toolkit is still there and there s still a conflict.

How canI reinstall VS from scratch (get rid of the AJAX toolkit and framework)?

in windows you should be able to goto the control panel > add remove programs and remove asp.net 2.0 ajax extensions 1.0

if items still show up in your project toolbox just goto "choose items" and deselect anything about ajax and also goto the folder with the ajax .dll (if it is still around after the removal) and delete it manually

how do I develop an Atlas application?

Hi

I have been developing asp.net applications for a couple of years now and am trying to get my head around this atlas/ajax thing.

If I was to build an application of say 20 .aspx pages I would know exactly how to go about it but I am a bit stumped on how to start an Atlas enabled one that is maintainable in a logical manner.

Instead of seperate aspx pages, do I use a user control for each "page" instead and make ajax call backs from a single page?

I can follow the examples on the Atlas website but they tend to contain only a little bit of functionality on each page - is this the way that most people are using it?

Are there any online documents that describe best practices for architecting a decent sized application using Atlas?

Any help or direction pointing would be appreciated.

cheers

Yes, I'm still organizing my sites into logical pages with atlas being used to update sections of the page dynamically, but the same principles hold true with normal asp.net functionality. You wouldn't create a site with only one asp.net page and try to handle all your functionality within just that one page with showing/hiding placeholders and event handlers for all your events. (At least I wouldn't!) I don't think you'd do the same with atlas. At some point you're going to want to load a new page, and that involves communicating with the server. I think there's only so much you want the client/surfer's PC doing - some things are better/safer when handled on the server and the resulting html returned to the client browser. It depends on your needs and what you're trying to do. That's just my .02.

(Plus you can't have an updatepanel inside a template, like a repeateritem, (yet :), so that really limits alot of what you can do anyway within just one aspx page)


i have worked on application which involves team management and it was round abt 20 pags app. We have put ajax on main pages like tasks list, billing pages and hours tracking page. Rest of the site, which involves add,edit ,delete such as for users ,projects etc ; we have used normal post back.

Dont design ur web app like a win app, with one form and many user controls. This will cause head ache in future.


ok thanks for that guys.

that actually helps a lot - I was getting myself confused with what was "possible". It looks like performance is still king in asp.netSmile

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 do I "replace" the ACT controls in my application?

Hi,

I have an application I wrote with an older version of the Atlas Control Toolkit. I just downloaded the latest version, and installed it. I'm wondering if there is anything else I need to do to update the controls in my application to use the more recent versions. Thanks.

Aaron

Nope. Just make sure the DLLs are replaced and everything should be fine.

Thank you.

Aaron


There were a few breaking changes in the framework though:

http://ajax.asp.net/files/Migration_Guide.doc

http://ajax.asp.net/files/Migration_Guide_Beta_Beta2.doc

How can i use Comet with Asp.Net?

Im writing basic chat application and i want to useComet technique.
Im trying something like that but when thread Sleep, all event waiting end of sleep. How can i use Comet technique with Asp.Net?

void Page_Load(object sender, EventArgs e) {while (Response.IsClientConnected) {if (newMessage) { Response.Write(newMessage); } System.Threading.Thread.Sleep(1000); } }

It's much more complex than that.

The only C# implementation I've seen is:

http://sourceforge.net/projects/emergetk/

But it's experimental, and looks like a discontinued project.

There is a commercial solution for that, called Lightstreamer (google for it). They are working on this for more than 5 years, and they have a solid server for comet development. But they charge good money for their product.


I am currently working on an affordable version of server push for asp.net.

When contacting the earlier mentioned 'lightstreamer', I received a qoute for US$70.000,-

I guess it was better to make it myself :)

The site is officially not up and running yet, but take a look at the samples onhttp://www.pushasp.net.

These samples also contain the code used.

If you want to play around with the conrols, they should be available for download somewhere this week.

regards,

Arnold


Lightstreamer Moderato has been released last month and is completelyfree of charge for any kind of use.

More info atwww.lightstreamer.com

The ASP.NET AJAX demo is available fromhttp://www.lightstreamer.com/atlasDemo.htm

Cheers




offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..

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.

Wednesday, March 21, 2012

How can I use a email regular expression in Ajax Toolkit

Hi I am developing an application using the validations of AJAX Toolkit. In one screen i make the user input the email address. I want to have a regular expression which will validate the input done by user. How can i add a regular expression in Ajax Toolkit.

Early response will be appreciated.

Praveen Mishra

drag a regularexpression validator on your form & set its controltovalidate property and regularexpression property. The client side validations will trigger before the partial postback.

Cheers

Vishal Khanna

(pls mark as answer if reply helps)


See the last bullet on this page:http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx about using validators with an UpdatePanel (assuming this is what you mean by the "Ajax Toolkit")

To use the the ValidatorCallout with your RegularExpressionValidator, seehttp://www.asp.net/AJAX/AjaxControlToolkit/Samples/ValidatorCallout/ValidatorCallout.aspx

-Damien


You have to set ValidationExpression Property of RegularExpressionValidator.control

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.regularexpressionvalidator.validationexpression.aspx

How can I optimize using ASP.NET with ajax control toolkit ?

-I have finish a web application. But when I launch it . It was running slowly. I can't understand what's happen in my web application.

-I'm using SQL Server 2000. My database have approximately 40,000 records. I used DataTable to store all records which I got information from database and using gridview , datalist control inside update panel.

-Especially my web application often use ModalPopupExtender to Insert or Update some informations.

-Could you show me how to optimize my web application with asp.net?

Thanks in advance !


There is no magic cure for making a website run fast. You will have to look at the page size, the objects you are storing in memory, enable tracing on the page to see where bottlenecks may occur and look at the speed of any database queries you are running (i.e. look at the execution plan of your stored procedures).

How can I incorporate Ajax HttpHandler in my application HttpHandler

My application uses its ownHttpHandler. I implementedIHttpHadlerFactory.As I have seen that, Ajax Asp.Net is uses several handler. That's why, In my application ajax is not working. Do you have any suggestion?

In web.config:

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/
<add verb="*" path="*.aspx" type="Groupcare.Web.UI.Handlers.GCHandlerFactory, GC.Web.UI.UIEngine"/>

</httpHandlers>

Your HttpHandler may interfere with partial postbacks. What you can do is check Request["X-MicrosoftAjax"]. In a partial postback, its value is "Delta=true". You can use that to have your handler abort on requests that are partial postbacks.