Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
calling code behind function from javascript
Gaurav Raj
Sep 25 2017 4:57 AM
162
Reply
i make this function
public
int
seemore(
int
a)
{
System.Threading.Thread.Sleep(5000);
var count = cs.da.Home2Procedure(Convert.ToInt32(Session[
"Id"
])).Count();
HiddenField1.Value = (Convert.ToInt32(HiddenField1.Value) + a).ToString();
int
tmpskip = Convert.ToInt32(HiddenField1.Value);
if
(Convert.ToInt32(HiddenField1.Value) <= count)
{
var q = cs.da.Home2Procedure(Convert.ToInt32(Session[
"Id"
])).Skip(tmpskip).Take(4);
DataList1.DataSource = q;
DataList1.DataBind();
foreach
(DataListItem dli
in
DataList1.Items)
{
DataList text = (DataList)dli.FindControl(
"DataList2"
);
Literal litral = (Literal)dli.FindControl(
"litBlogId"
);
LinkButton link = (LinkButton)dli.FindControl(
"TotalLike"
);
UpdatePanel up = (UpdatePanel)dli.FindControl(
"UpdatePanel1"
);
if
(text.Visible)
{
int
bid = Convert.ToInt32(litral.Text);
var q1 = cs.da.CommentsProcedure(bid).OrderByDescending(oo => oo.C_Id).Take(3).Reverse();
text.DataSource = q1;
text.DataBind();
}
var q2 = cs.da.TotalLikeNameProcedure(Convert.ToInt32(litral.Text));
// skip = DataList1.Items.Count;
//up.Update();
}
this function are in aspx.cs page
how can I call with javascript
please help guys
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Sql exception caught correct me where iam going wrong
Validation controls in ASP.NET