Showing posts with label enabled. Show all posts
Showing posts with label enabled. Show all posts

Wednesday, March 28, 2012

Updating a status label

I have a recently insalled the AJAX Beta 1 and I was wondering if it will enabled me to change a label multiple times in a sub... see the code below.

Protected Sub cmdSubmitUpload_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles cmdSubmitUpload.CliclblUploadStatus.Text ="Saving file on server..."'do the save herelblUploadStatus.Text ="Verifying file..."'call a routine that verifieslblUploadStatus.Text ="File verified."End Sub
I want to change the label and have the user see it change every time.  Is there a way to do this using AJAX?

Hello, the code that you write for an event handler will run on the server when the request is received, and the result of this is one and only one response that will update the page. If you want to provide this kind of feedback, you would need to write more client side code that executes each part of your process separately and can update the label before each step. You can seach msdn for a Whidbey feature called CallBacks that will allow you to do this, or you can make use of Atlas ability to call webservices from script.

Hope this helps,
Federico

Wednesday, March 21, 2012

Urgent - Trying to make Localization work (RC version)

I am going crazy with localization. It doesn't work :(

I have 2 projects: a web application (ajax enabled) and a class library with a server control.

I have this in my server control:

[assembly:

WebResource("SomeControl.myScript.js","text/javascript")]

[assembly:

ScriptResource("SomeControl.myScript.js","SomeControl.Res","SomeControl.Res")]

The myScript.js file is marked as embedded resource.

I have SomeControl.res and SomeControl.pt-BR.res resource files.

I have EnableScriptLocalization="true" in my ScriptManager.

I am registering myScript.js in the OnInit phase of the server control, like this:

// get script manager

ScriptManager scrMgr =ScriptManager.GetCurrent(this.Page);// register javascript fileScriptReference scriptRef =newScriptReference(

Page.ClientScript.GetWebResourceUrl(

this.GetType(),"SomeControl.myScript.js"));

scriptRef.NotifyScriptLoaded =

true;

scriptRef.ScriptMode =

ScriptMode.Auto;

scrMgr.Scripts.Add(scriptRef);

--

The problem is that the client side resource object is not being generated!!!

When I run the page and look with Fiddler, I have only the contents of myScript.js,but not the contents of the resources that I need.

I should have the contents of the resource files ready to be used client side.

I really need this feature and I am speding hours with this without success... I'd like to know if anyone here could make it work, and if possible, give me a help.

Thanks!

I found the problem :)

I must register myScript.js like this:

// get script manager

ScriptManager scrMgr =ScriptManager.GetCurrent(this.Page);// register javascript fileScriptReference scriptRef =newScriptReference("SomeControl.myScript.js","SomeControl");

scriptRef.ResourceUICultures =

newstring[] {"pt-BR" };

scriptRef.NotifyScriptLoaded =

true;

scriptRef.ScriptMode =

ScriptMode.Auto;

scrMgr.Scripts.Add(scriptRef);

Now it works...

Cheers!

Urgent! Need a asp.net Ajax enabled TreeView control

Hi,

I need a asp.net ajax enabled TreeView control, its not a part of the AjaxControl Toolkit. I need to know where from I can get it.Please let me know if any of you have come accross a one.

Thanks in advance,

Subhadip

http://www.google.be/search?hl=nl&q=treeview+ajax&btnG=Zoeken&meta=

Lots over there ;)

Kind regards,
Wim

URL parameters within Atlas enabled Web Service

I was able to test my Web Service by passing in the parameters via an URL string. (i.e. localhost/service.asmx/GetNames?id=1) But since I "Atlas enabled" my Web Service, this functionality no longer works. I receive the error,Request format is unrecognized for URL unexpectedly ending in...

I would like to have the flexibility of passing in URL parameters to some of the methods. Is this just not possible?

Thanks in advance.

Juan

Juan,

You could try a different approach. Check out a tool called Web Service Studio. You give it the url to your service, http://localhost/service.asmx, and it will discover all of the methods available at that service and what their parameters are. Then, type your test parameters into the text boxes and click the Invoke button. That will call the web service and display the results.

One advantage of using this tool is that you can test a web service even if its web.config is set up to disallow GETs and POSTs.

Here is a link to the tool:

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=65a1d4ea-0f7a-41bd-8494-e916ebc4159c

Mindreef SOAPscope is another, more sophisticated tool, but it is not free:

http://www.mindreef.com/

- Brandon


Thanks! This will do just fine.

Juan