473,656 Members | 2,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get value of a textbox and use it in vbsciprt

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 = document.frmMai n.LLUValue.valu e ' (this doesn't
work. Can't get http text box to work)
window.open "/SMSReporting/Report.asp?Repo rtID=12&variabl e=" & CompUser
End Sub

I need to use the vbscript because I have to open a new page, which I don't
think is possible with the server side controls and I can't find a way to
use the document method to read the asp.net object.
Thanks.

Here is the whole page

<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form1.aspx.vb"
Inherits="remot e.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="VBScri pt" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
</HEAD>
<BODY ms_positioning= "GridLayout ">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="#d6ecd 8"
border="0">
<tr>
<td vAlign="middle" align="center" bgColor="#a0a0a 0" colSpan="4"
height="20"><fo nt face="Verdana, Arial" color="#ffffff" size="1"><b>SMS
2003 Remote Control</b></font>
</td>
</tr>
<tr bgColor="#a8d7b 3">
<td vAlign="middle" noWrap height="20"><fo nt face="Verdana, Arial"
size="1"><b>&nb sp;&nbsp;&nbsp; &nbsp;</b></font></SPAN>
</td>
</tr>
</table>
<form id="Form1" method="post" runat="server">
<asp:button id="Button2" style="Z-INDEX: 101; LEFT: 123px; POSITION:
absolute; TOP: 124px" runat="server"
Text="RemoteCon trol"></asp:button>
<asp:textbox id="TextBox1" style="Z-INDEX: 102; LEFT: 120px; POSITION:
absolute; TOP: 76px" runat="server"
Height="25px" Width="237px"></asp:textbox><as p:label id="Label1"
style="Z-INDEX: 103; LEFT: 380px; POSITION: absolute; TOP: 80px"
runat="server"
Width="84px" Height="23px"
Font-Bold="True">Mac hineName</asp:label></form>
<td vAlign="top" width="697" colSpan="2" height="11"><sp an
class="blacktex t"><FONT size="2">
<P><INPUT id="button3" style="Z-INDEX: 104; LEFT: 129px; WIDTH: 126px;
POSITION: absolute; TOP: 232px; HEIGHT: 24px"
type="button" value="Button"> &nbsp;&nbsp;&nb sp;
<asp:TextBox id="TextBox2" style="Z-INDEX: 105; LEFT: 125px; POSITION:
absolute; TOP: 192px"
runat="server" Width="222px"></asp:TextBox>
</FONT></span>
</td>
<tr>
<td width="452"></td>
</tr>
<tr>
<SCRIPT language="VBScr ipt">
Sub Button3_OnClick
on error resume next
dim CompName
Compuser = document.frmMai n.LLUValue.valu e
window.open "/SMSReporting/Report.asp?Repo rtID=12&variabl e=" & CompUser

End Sub
</SCRIPT>
</P>
</BODY>
</HTML>

Nov 19 '05 #1
0 1136

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
15710
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New Record button is clicked. The code checks the table for the highest value and then assigns 1 and inserts the value. I have a second text box which needs the same type of custom auto-number which has to be generated from a second command button. ...
1
6698
by: Martin | last post by:
Dear Group Sorry for bothering you again but I need expert advice on this. I have placed a HTML textbox on my aspx form and converted it to run as a server control. At some point in my code I assign a value to this textbox using Javascript with 'Form1.TextBox1.Value = "Hello"' But when I want to read the value of this Textbox later on using VB with 'MyVar = TextBox1.Text' it returns nothing.
2
2010
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 show the current value in edit mode. I'm sure this is a common question. I've reviewed several related post and tried them out to no avial. Some of the offerings in listgroup look right on, but are not clear on where to handle the suggested...
3
3982
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='<% =Server.HtmlEncode(Request.Cookies("Username")("Username"))%>'> i have created a cookie and want to use it with my login page. I currently have asp:TextBox with form validation control. I can get the cookie value to appear but not in the asp:TextBox. I can use a...
0
2605
by: d.steininger | last post by:
Hi there! Is there a way to bind a Textbox.Text to a ScrollBar.Value (not the Textbox-own Scrollbar) and vice versa? The Problem: I have to deal with two controls. The Textbox should accept integers as input, limited by a ScrollBar's Minimum- and Maximum. Changing the ScrollBar-Value should update the Textbox-Text and vice versa. So the textbox-text and scrollbar-value represent the same value. The user is
2
12584
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's first column is a textbox(TemplateColumn), the other 3 columns are just display(BoundColumn). (1) if the value of the textbox is 0, then i'd like to change it null, so the box is empty
5
5852
by: gabba | last post by:
Hi, is it possible to call a subroutine (or a function) using variable name? Sub a() Response.write("sub a") End sub Sub b() Response.write("sub b") End sub
3
10790
by: remya1000 | last post by:
i'm using ASP with MSAccess as database. i have two buttons and two textbox in my page. when i press my first button (First month) i need to display the current month in one textbox and last one months date in another textbox. and while pressing the second button (submit) i need to display the date displayed in the textbox as itself and the records between thoses two dates. if that date is still there in the textbox only i can sort the...
4
2894
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field is not a null value. I am not using any code behind (C#) to bind the data or manipulate the data. I have read that when there is a null value in the database that there is no record in the "dataset". Can anyone show me how to bind a value in the...
0
8296
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8710
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1598
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.