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
Manoj Mandal
1.3k
457
18.9k
pass value to web method
Jun 3 2021 1:26 PM
i want to pass checkbox value to string res when checkbox is checked.
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static List<string> GetSearch(string prefixText,string res)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
SqlDataAdapter da;
DataTable dt;
DataTable Result = new DataTable();
string str = "Select distinct ITEMNAME from ALLRECIPE where RECIPE IN("+res+") and ITEMNAME like '%" + prefixText + "%'";
da = new SqlDataAdapter(str, con);
dt = new DataTable();
da.Fill(dt);
List<string> Output = new List<string>();
for (int i = 0; i < dt.Rows.Count; i++)
Output.Add(dt.Rows[i][0].ToString());
return Output;
}
Reply
Answers (
1
)
How to open popup page
save all rows in kendogrid to database on btnclick even