Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass the value of the textbox 1

Status
Not open for further replies.

compu66

Programmer
Dec 19, 2007
71
US
Hey all

I have a textbox which is visible,when visible the textbox values pass to another page(billing pge) properly.
But from admin side we have the ability to disable modules.So if this textbox is disbaled then the vallues obviously dont pass.

But heree my task is even if the textbox( which holds units values ) is not visible the values should go to the other page whicn is billing module.

Sorry if i am not clear.

Thanks for any help in advance.

 
The values are still available in my simple test, even though the TextBox is invisible:
Code:
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </div>
    </form>
Code:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ' Set a value and hide the textbox on the first load of the page
        If Not Page.IsPostBack Then
            TextBox1.Text = "100"
            TextBox1.Visible = False
        End If
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Write out the value from the invisible textbox
        Response.Write(TextBox1.Text)
    End Sub


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top