Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how send textbox value listview with button to another page
mahnaz af
Jun 7 2015 2:40 AM
514
Reply
hi everyone ,i want to sent value of textbox in listview use button to another page,i use this code but program take an error that:
Object reference not set to an instance of an object.
protected void addtobasket_Click(object sender, System.EventArgs e)
{
string count2 = (((sender as Button).Parent as ListViewItem).FindControl("txtcount") as TextBox).Text;
}
<ItemTemplate>
<asp:TextBox ID="txtcount" type="text" runat="server" Width="30"></asp:TextBox>
<asp:Button ID="addtobasket" runat="server" Text="Add to basket" OnClick="addtobasket_Click">
</asp:Button>
</ItemTemplate>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to donwload file from ftp in asp.net
How can i get authentication by passing user name and apiKey