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)

>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()
...
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.