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
Bineesh Viswanath
NA
1k
780.6k
ASP.NET GridView Fill Error
Aug 31 2013 5:27 AM
Sir, I having a situation where values are not retrieving from database to GridView.
But database table has values saved in it.
Here my tbl_Customer:-
The error is:-
So here I posting the all codes:-
1) SQL SP:-
ALTER PROCEDURE customerviewAll
AS
SELECT *
FROM tbl_Customer
2) Sp class :-
public DataTable ClassViewAll ( )
{
DataTable d = new DataTable ( );
SqlDataAdapter a = new SqlDataAdapter ( "customerviewAll" , sqlCon );
a . SelectCommand . CommandType = CommandType . StoredProcedure;
a . Fill ( d );
return d;
}
3) And the .aspx.cs:-
public void GridFill ( )
{
DataTable d = new DataTable ( );
CSP sp = new CSP ( );
d = sp . ClassViewAll ( );
gvCustomers . DataSource = d;
gvCustomers . DataBind ( );
}
Please help me in this topic.
rror
Reply
Answers (
13
)
Data Types and Values
Find getElementById of textbox