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
Sousa Pambo
NA
92
24.2k
ERROR: Method name expected
Nov 17 2016 6:57 AM
Hi, i get this error ,Method name expected, when I write this code, please help
public string MonthP(string student_id, int y, string mth)
{
string sql = "Select sitS from Sit where student_id='" + id + "' and years='" + (y).ToString() + "'";
using (SqlConnection cn = new SqlConnection(con.stringConex()))
{
try
{
cn.Open();
using (SqlCommand cm = new SqlCommand(sql, cn))
{
using (SqlDataReader rd = cm.ExecuteReader())
{
if (rd.Read())
{
return
rd["sitS "]
(Convert.ToInt32(mth) - 1);
// Error on this line
}
else
{
return "-1";
}
}
}
}
catch (Exception ex)
{
return "-1";
}
}
}
Thanks!
Reply
Answers (
4
)
Problem in asp.net application while running on liveserver
Do i need partial view compulsary to add devExpress Gridview