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
Chris Gullison
NA
8
3.4k
Displaying PDF document
Mar 16 2016 9:56 AM
Hi there, I am currently working on a project where you can upload and view a PDF document. So far I have the upload PDF function completely working. The only issue I am having is when I click on my View LinkButton I get an error: "Input string was not in a correct format.". I feel as though my LinkButton is properly linked but the error occurs when it hits:
int id = int.Parse((sender as LinkButton).CommandArgument);
Also, when I use: //var id = ((LinkButton)sender).CommandArgument; instead, I'm not getting errors, but nothing is showing up.
The code for my LinkButton is shown here:
<asp:LinkButton ID="lnkView" runat="server" Text="View" OnClick="Button2_Click" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
Any help would be GREATLY appreciated!
Thanks you,
M
Reply
Answers (
5
)
facebook
color change one word in gridview