0

Good mn ,
I had one dropdownlist & 'add new item'button in firstpage.
like that i had a textbox in the second page..
when i click the add button i want to go to
the second page..here i type a text in that textbox.
now i want to transfer the text into firstpage
and it should be added with in that dropdownlist.
i try it with the help of session.
but i not able to add
code-second page
---------------------

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) 

Handles Button1.Click
        Session("TextBox1") = TextBox1

    End Sub
//i too write this codings in the page load..
code - first page
-----------------------
TextBox9.Text = (Session("textbox1").ToString)

        DropDownList1.Items.Add(TextBox9.Text)

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
0

>Transfer value from one page to other


Method - 1 Cross Page posting (PostBackUrl Property)
Method - 2 Query String (Request collection)
Method - 3 Session.

FirstPage.aspx

..
Session("text1")=TextBox1.Text
Response.Redirect("NextPage.aspx")

NextPage.aspx

..

var1=Session("text1").ToString()
...
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.