Showing posts with label supposed. Show all posts
Showing posts with label supposed. Show all posts

Monday, March 26, 2012

Intellisense in AJAX RC1

I've had this problem is I moved to AJAX Beta 1 but my intellisense is broke and it's driving me crazy. When is this supposed to be fixed?

Hi,

there's an intellisense tip inthis blog entry by Scott Guthrie.


VS2005 SP1 fixes this problem.

http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx


Hello autoflyer,

autoflyer:

VS2005 SP1 fixes this problem.

http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx

is this Problem fixed in youre installation?

I've installed both vs2005sp1 and AJAX RC1 but the intellisense works only with the opened masterpage or change the tagprefix away from "asp". I also cleaned up my [ReflectedSchemas] folder like Scott says inthis Blog.


Hi,

I use VS2005 Pro and the intellisense problem I experienced with AJAX tags in content pages is indeed fixed with SP1 for me. I have applied SP1 to 2 machines at work both of which no longer exhibit the intellisense problem.

Saturday, March 24, 2012

Invoke an exe file on server side

I created a page with a button. The user presses this button and it is supposed to invoke an exe file that works on the server side. I tried the following code behind:

Label2.Text ="The bot began it's work. Pleas wait..."Dim startInfo As System.Diagnostics.ProcessStartInfoDim pStart As New System.Diagnostics.ProcessstartInfo = New System.Diagnostics.ProcessStartInfo("http://.../files/BotScript1.exe")pStart.StartInfo = startInfopStart.Start()pStart.WaitForExit()Label2.Text = "The bot has finished it's work"

My problem is that this doesn't work on the server side: Pressing the button asks the user if he wants to open the file. I want this file to work on the server.

If this can't be done for security reasons (I don't see why not - this file has nothing to do with the user, but is part of the server script), I would like to use the source code of this exe file and run it on the server. The problem doing it this way is that the script is in c# and my pages are in VB.NET.

Thanks
Yoni

If the .exe is on your web server, try using Server.MapPath in the ProcessStartInfo() to get the actual file location, instead of the HTTP (virtual) location.


doyleits:

If the .exe is on your web server, try using Server.MapPath in the ProcessStartInfo() to get the actual file location, instead of the HTTP (virtual) location.

I tried that, and the exe runs, but as a diff problem came up, I decided to put the source code in my code behind page. I now face a new problem:

I have created a listbox inside an update panel, but when I use the code behind to add items to the listbox (in order to notify the user whats going on) - they added items don't appear until the server is done with the code. How can I get the listbox to refresh itself every time I add/remove/edit items from it?

Thanks,
Yoni


Put the ListBox inside UpdatePanel. Also set the UpdateMode property toConditional

When items will be added/deleted call UpdatePanel1.Update()

http://www.asp.net/ajax/documentation/live/mref/M_System_Web_UI_UpdatePanel_Update.aspx


chetan.sarode:

Put the ListBox inside UpdatePanel. Also set the UpdateMode property toConditional

When items will be added/deleted call UpdatePanel1.Update()

http://www.asp.net/ajax/documentation/live/mref/M_System_Web_UI_UpdatePanel_Update.aspx

I did as you said: I added a UpdateMode="Conditional" property to the Update Panel and used the Update() function after every change I did to the list - but still nothing. Any ideas?

Thanks
Yoni


Hi Yoni,

I recommend copying those source code into a class library. And reference the assembly in your web application. It's better than changing security settings.

After the class library has been compiled into an assembly, it can be used regardless of what language it's written in.


Sorry, I didn't notice that you've solved the running exe issue.

yonidebest:

I tried that, and the exe runs, but as a diff problem came up, I decided to put the source code in my code behind page. I now face a new problem:

I have created a listbox inside an update panel, but when I use the code behind to add items to the listbox (in order to notify the user whats going on) - they added items don't appear until the server is done with the code. How can I get the listbox to refresh itself every time I add/remove/edit items from it?

Thanks,
Yoni

I think you can add a timer on the page to refresh the page at a specific interval.