TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
George Onofrei
NA
89
14.6k
Cross Page question
Jan 7 2011 1:17 PM
Basically, what I am trying to do is send information via PreviousPage somehow, but can't figure out how. Let me explai:
On One page (FirstPage.aspx) I have a DataList(Id = "DataList") which contains Labels(Id = "Label") ImageButtons (Id = "ImageButton"). Now when I press an ImageButton with PostbackUrl to second page, I need a way to get the Text from the label, but from the label from the selected item.
I've tried:
DataList idDataList = (DataList)(Page.PreviousPage.FindControl("DataList"));
Label idLabel = (Label)idDataList.SelectedItem.FindControl("Label");
string id = idLabel.Text;
but I get null on idDataList.
Also read that you can put an OnClick event on the ImageButton and the server executes both OnClick and PostBackUrl, but in vain. I mention that OnCLick event is on server. My next try is to put OnClick on client with javascript and will post back. Thanks in advance!!!
Reply
Answers (
2
)
file upload
.Net