ASP - ASP+VBscript

Asked By JAYA PRAKASH
08-Feb-10 03:58 AM

How to read array elements in ASP+VBscript(not assigining the elements to array)?

I have the following code, please tell the error in the program

<%@LANGUAGE="VBSCRIPT" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%public n,i%>
<%public a(10)%>
<%Response.write(date)%>
<script language="VBScript">
n=inputbox("Enter the no of elements")
msgbox n
</script>
<%
for  i = 1 to n
Response.Write("<" & "script language=VBScript>")
Response.Write("InputBox """ & a(i) & """<" & "/script>")
next%>
</head>
<body>

</body>
</html>

You are capturing the value of N client side  You are capturing the value of N client side

08-Feb-10 09:46 AM
N = 0 server side.  You need to post/submit the page back to the server for this code to work.  You can't populate a variable in client side script and expect that value to dynamically make its way back to the server and your server side code.
Create New Account
help
ASP+VBScript end of post What would you like to know about classic asp? I want a ASP+VBScript program to read array elements(not assigning values to array)? Please send me the program not as a value please check the program for any error. let me know < %@LANGUAGE = "VBSCRIPT " %> <%option explicit%> <%dim a(10), n, i, x, y%> <html> <head> <title> Untitled Document< / title Type" content = "text / html; charset = iso-8859-1"> <%for i = 0 to 4 %> <script language = "VBScript"> x = InputBox ("Enter the array elements" ) < / script> <%y = Cint(x)%> <%a(i) = y%> <%Response.write("Array" & a(i
ASP+VBScript In this program iam trying to read and store the elements in an array. But storing the elements in an array. Can anyone please help to correct the errors < %@LANGUAGE = "VBSCRIPT " %> <html> <head> <title> Untitled Document< / title> <meta http-equiv = "Content-Type" content = "text / html; charset 8859-1"> <%dim n, i%> <%dim a(10)%> <%Response.write(date)%> <%Response.Write("<" & "script language = VBScript> ") Response.Write("InputBox ""Enter the no of elements" & n & """<" & " / script> ")%> <%for i = 1 to n Response.Write("<" & "script language = VBScript> ") Response.Write("InputBox ""Enter the array elements" & a(i) & """<" & " / script> ") Response.write("Array" & a(i)) Response.write(n) next% for i = 1 to n Response.Write("<" & "script language = VBScript> ") Response.Write("MsgBox """ & a(i) & """<" & " / script> ") next%> < / head> <body> <form action = "array.asp" method = "post
How to sum and display total in a label using javascript ASP.NET I am having a grid view as follows I have written a javascript to me IF you just want a total then easy way is to use aggregate function : < asp : TemplateField HeaderText = "Net Amt"> < ItemTemplate > < asp : Label ID = "lblNet" runat = "Server" Text = ' <% # Eval("total") %> ' / > < / ItemTemplate > < / asp : TemplateField > protected void Page_Load( object sender, EventArgs e) { if (!IsPostBack) { bindGrid(); } } void bindGrid() { SqlDataAdapter da i ]. innerHTML ); document . getElementById ( 'label' ). innerHTML = "TOTAL:" + sum ; Hello, Take Gridview templatefield as following way < asp:TemplateField > < ItemTemplate > < asp:TextBox ID = "txtQuantity" onchange = "Total()" runat = "server" > < / asp:TextBox > < / ItemTemplate > < / asp:TemplateField > < asp:TemplateField > < ItemTemplate > < asp:TextBox ID = "txtRate" onchange = "Total()" runat = "server" > < / asp:TextBox > < / ItemTemplate
to encrypt all files in folder(older that some data) with very strong algorithm use VBScript? VBScript FilePath = " \ server \ folder" FileAge = 10 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(FilePath Then . . . . . . . code to encrypt. . . . . . . . . . . . . . Else End If And decrypting, when this required, to use separate vbscript-decryptor. Thanks. VBScript Discussions CipherMode (1) Bit (1) VBScript example (1) CreateObject (1) Generate (1) Encrypt (1) Decrypt (1) 128 bit encryption (1) There to encrypt all files in folder(older that some data) with very strong | algorithm use VBScript? | | | VBScript | | FilePath = " \ server \ folder" | FileAge = 10 | | Set objFSO = CreateObject("Scripting.FileSystemObject") | Set objFolder = objFSO.GetFolder(FilePath Then | | . . . . . . . code to encrypt. . . . . . | . . . . . . . . | | Else | End If | | | And decrypting, when this required, to use separate vbscript-decryptor. | | Thanks. | strong - -- -- -- -- well, I find AES string encryption in VBScript, example 1): Dim fso