How to get the textbox values into a vb-script

I'm using the club web site starterkit to develop my site and I can't get the log in function to work. The site is coded in aspx and when you push the log in button, a vb-script executes. This script is located befor the aspx body. When i write the code to get the value of the username and password textboxes, a error message accoure (UserName not declared). I've searched the Internet and all the code examples I find tells me that I've written the code correct. Why doesn't this work?

This is the code I write to get the values:

Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim kontroller As LoggInnKontroller
        Dim user As String
        'im pass As String

        user = UserName.Text
        pass = Password.Text
   

        kontroller = New LoggInnKontroller
        kontroller.LoggInn(user, pass)
End Sub


to view the whole code for the login-side, go to http://www.nomorepasting.com/paste.php?pasteID=57310

please help me
0
iste
2/9/2006 10:04:05 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

3 Replies
1565 Views

Similar Articles

[PageSpeed] 20

Do you have a textbox called UserName?


Peter Brunone
MS MVP, ASP.NET
Founder, EasyListBox.com
Do the impossible, and go home early.
0
PeterBrunone
2/9/2006 5:53:34 PM
Yes, the textboxes is calles UserName and Password
0
iste
2/14/2006 9:20:37 AM

they are held within another control and not directly accesible...

you need to use the .FindControl() on the parent container and cast it into a TextBox, then it should be available to you.


0
Curt_C
2/14/2006 8:06:56 PM
Reply:

Similar Artilces:

problem with get value from textbox after get it value in load page
hi every one  i have problem with my web site when i get textbox value in load page   and Changed textbox the page do not take last value .   it take value in load page   this is code:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)   TextBox1.Text = "aa" End SubProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) MsgBox(TextBox1.Text) End Sub   when i press button message write "aa" while i changed the textbox   please if enyone knowen help me &nbs...

VB.net add textbox values together to get total
Hi Guys Im using visual studio 2005 vb.net. sql express, im a newbie and im basically trying to create a customer calculator. Ive got this code, basically i want to add the integer values of each of my text boxes together and then display them in a textbox called textbox1.  I think i have the code write to do the calculation but im stuck on how to get it to display the total in the textbox once ive hit the calculate button, ive tried several ways, the page posts back, i get no errors but nothing in textbox1 toocan you take a look and help me out please. Thanks and Kind Regards &...

How to get the value of a textbox that has been added to a template field in a gridview. VB.Net
I have a gridview that shows products, description, price. I have added a Buttonfield and a TemplateField that has a Textbox with the id QuantityTextBox.What I am trying to do is get the value of the Quantity TextBox in the RowCommand event of the gridview. I can get the price but need to get the quantity also. To get the price I used ItemPrice = Server.HtmlDecode(row.Cells(5).Text) My template field is cell 6 but the above routine does'nt work. Any help would be greatly appreciated.Dan5150www.5150creations.com Hiuse this: VB:  Protected Sub GridView1_RowCommand(ByVal ...

POST GET GET GET GET... WTH?
Hi, I'm at a loss to explain this... I have an ASPX page that I can't always navigate to. When I developed the app (it's Starter Kit Portal-based), I did it on my LAN and have had no trouble accessing the page. However, upon deployment, I see the following behavior: 1. POST request goes out looking for MyForm.aspx 2. GET request for MyForm.aspx 3. GET request for MyForm.aspx 4. ... X. GET request Sometimes, the page finally loads. Other times, it just ends up blank. Many times, it doesn't load at ALL the first POST - I just get a "The pa...

getting value from string (VB .net)
HiJust a quickie (i hope) - i'm trying to get a value from a string but not sure what method to use.Eg Dim myString As String = "(ng) nottingham"How would i get the value between the parentheses - ng?  The values are either going to be a single or two characters if this helps?I can think of a work around using myString.IndexOf() but i'm sure there must be a specific function for this problem? thanks  Hey, You could loop through the three or four characters, use the Substring method and trim/remove the parens, or you can use regular expressions.Brian"Trust in the Lord a...

How do I get the value from this combo box in vb .net...
In asp .net I have it under control however in vb .net its not quite the same. I have a dataadapter that I pop with a ds. bind it to the combobox. Now I'm trying to get the selected value and I'm thinking I have to do a ctype but don't know what the param's are. can someone please help... Here is the code: myConnection.Open()myDataAdapter = New SqlDataAdapter(strSQL, myConnection) Dim myDataSet As DataSet = New DataSet() myDataAdapter.Fill(myDataSet, "ListingStatus") Dim myDataView As DataView = myDataSet.Tables("ListingStatus").DefaultView lstStatus.DataSource = myDataView lstStatus....

Get the column value from a DataGrid
 Hi,I have a datagrid with 6 columns. I am trying to retrieve the value of a column and pass it to a variable. I am not sure what I doing wrong here since the code I am using is not pulling any value from the column.  This is an example of what I am trying to do. Dim column_value As Stringcolumn_value = DataGrid1.Items(0).Cells.Item(4).Text                        Please correct me if I am wrong.   Thanks.    Use a GridView control instea...

getting values from script in vb to url in form
This is in masterpage.master. <script>    sub page_load()       ' run a query here       ' assign x and y to values from row returned    end sub  </script> This is further down in the master page. <form runat="server" id="form1">    <a href="page2.aspx?a=2&b=3">        ' how to get x , y from sub in master into that url instead of 2 and 3?       clic...

How can I get value from ObjectDataSource in VB script?
Hi,   I want to get the "Amount_L" in VB script, how should I code? -------------------------------------------   <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" DataSourceID="MeasurementReceipt_ODS">                   <ItemTemplate>                        <table width="625" border="0">&...

Get values set by javascript to .net enabled textbox
I have a bit of javasript that writes a value to a text box.  The text box is read only. Textbox code:<input type="text" id="txtColor1" runat="server" readonly="readonly" size="6" /> Snippet from javascript functioncolorBox = document.getElementById('<%= txtColor1.ClientID %>');colorBox.value = colorCode;  Code behind:string color1 = txtColor1.Value Whenever I attempt to get the value out of the text box after it has been changed by the javascript, it always reverts back to the old data and not the new. Anyo...

Getting viewstate value from readonly textbox in .NET2 (VB)
Hey guys...I have a form that asks for several dates.  I tried using asp calendar controls to set values of the date textboxes which were readonly.  I found this annoying since each time I advanced a month and/or selected any date, it posted back and refreshed the page. So, instead, I resorted to an old javascript function I use a lot.  The javascript creates a pop up (html) window and sets the value of the textbox when the user picks a date.  I had done this many times in ASP.NET1.  However, since upgrading to .NET2, I noticed I was getting errors and the data I was...

Get Scope Identity Value using ObjectDataSource and Vb.Net
Hi, I have been trying to get the scope Identity after inserting a record using an ObjectDataSource. I can't find what event, or how to get the value that the scope identity returns. Here is my Sproc. ALTER PROCEDURE dbo.[YourCompany_LanCustomer_Insert]     (     @DNNUserID int,     @FirstName nvarchar(50),     @LastName nvarchar(50),     @Address nvarchar(50),     @Address2 nvarchar(50),     @City nvarchar(50),     @State nvarchar(50),    ...

Get the value of a business rule from a model in the repository VB.NET
Hi All, I open a repository connection, and iterate over its ChildObjects collection. When I find a repository model, I drill down on its ChildObjects collection, looking for business rules, as in the following fragment: For Each child As PdRMG.BaseObject In CType(parent, PdRMG.StoredObject).ChildObjects If child.ClassName = "Business Rule" Then If CType(child, PdRMG.StoredObject).Name = "The one I am looking for" Then 'Get the Business Rule Value and do something with it... End If End If Next My problem is: How do I acces...

getting start with vb.net and crystal repots(web form)
I use Crystal Report9 in Visual Studio.NET 2003..... Example at Northwind database I want a application that.....a form include a combobox that contain CustomerID.....If I choose one CustomerID and click OK button....a Report will display information about this Customer......I think that must use Paramater.....how to do that ???? (How do I start to coding --please step by step or sample) please help me !!! Thank you so much!!! very good I have Dropdownlist when I choose the 'month'--> the all data of this field will show I use this Private Sub ddlMonth_Sel...

Web resources about - How to get the textbox values into a vb-script - asp.net.getting-started

Microsoft Edge will not support VML, VB Script, Toolbars, BHOs, or ActiveX to improve security
Crispin Cowan / Microsoft Edge Dev Blog : Microsoft Edge will not support VML, VB Script, Toolbars, BHOs, or ActiveX to improve security — Microsoft ...

Resources last updated: 12/17/2015 6:48:06 PM