473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to get the value returned by runing this script in textbox or label of HTML page

18
hi dear,

some body please guide me in this problem that,i am using the following "vbscript" to get the free space of "C" Drive in Megabytes. when i copy this code and save as "Diskspace.vbs" then scipt file will be created as like "Mydisk.vbs". the following is vbscript code.

vbscript code:

Const CONVERSION_FACTOR = 1048576
Set objWMIService = GetObject("winmgmts://102.223.141.126")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:' ")
FreeMegaBytes = objLogicalDisk.FreeSpace / CONVERSION_FACTOR
Wscript.Echo "There are " & Int(FreeMegaBytes) & _
" megabytes of free disk space on IP address 126."



C#( ASP.NET ) code:

protected void Button1_Click1(object sender, EventArgs e)
{

Process.Start(Server.MapPath("~/Mydisk.vbs" ));
}

when i run that script file through C# code, on button click event, an alert message open,asking that "There are 45213 Megabyte of free disk space on IP address 126."

Now what i require, i want that when the file name "Mydisk.vbs" is got fire then, with out prompting alert message that value should be assigned to label or textbox of that HTML page.

Now, how could i assign the value returned by script to textbox of web page??

please some body arrange this vbscript code to get the value in label or textbox, not as alert message as it is generated by script.

please some coding hints........
Oct 20 '08 #1
0 1062

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Benedict Teoh | last post by:
I created a dropdownlist containing day, month and year field and expose a property to assign a date. When I call from a aspx page and assign the value, the new date is not displayed until a submit...
2
by: jason | last post by:
Pardon my ignorance on this. The below code works, except, when I edit a record and update the two drop downs take the first entry in the dropdownlist if not selected. I'd also like the dropdown to...
3
by: Justin Morris via DotNetMonster.com | last post by:
<asp:TextBox ID="TextBox1" runat="server" value='<%=Server.HtmlEncode (Request.Cookies("Username")("Username"))%>'/> <input name="Password" type="text" id="Password" value='<%...
0
by: msnews | last post by:
I need to read the value typed into a textbox (textbox.txt) and then use it in some code that looks like this: Sub Button3_OnClick on error resume next dim CompName Compuser =...
0
by: Seok Bee | last post by:
Dear Experts, I am having a wizard control in my web app. I have some textbox controls within the wizard control. At the same time, I have a hyperlink to run a pop-up window for calendar. The...
5
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On...
3
by: Ken Cox [Microsoft MVP] | last post by:
I've been going around and around on this one. I can't believe that it is "by design" as Microsoft says. Here's the situation: In *declarative* syntax, I'm trying to create a default datetime...
1
by: JTok | last post by:
I have an asp.net website I am designing using VS2005 standard. It is installed on Win2K3 Enterprise. In a Wizard Control, I want to take user input from two textboxes, add them together, and then...
6
by: Ahmedhussain | last post by:
Hi there, I m doing work on a gridview and Im getting an error: A potentially dangerous Request.Form value was detected from the client (ctl00$Content$GridView1$ctl03$TextBox1="<span...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.