G
Guest
Hey everyone. I was wondering if someone could help me with a small problem.
I have designed a user control and I would have inserted it on a aspz page
(WebForm1). The User control is being used to help with the navigation
through a datagrid. The control handles all the paging issues and on the
webform I do all the DataBinding.
My problem is that at the end of code of an on-click event for a link button
on my user control (DataGridNavigation.ascx) I need to call the DataBind
Method. The problem is that the DataBind method is sitting on the WebForm1
code behind page.
Here is a part of my code on the Code behind in the user control (ascx.cs
file) and commented is here I need to call the DataBind method.
private void No1_Click(object sender, System.EventArgs e)
{
_currentPageNumber = int.Parse(No1.Text);
this.CurrentPage.Text = _currentPageNumber.ToString();
ShowHideNavigation();
/*Need to call the DataBind method in here somehow
This DataBind Method is sitting on the WebForm1 code behind page*/
}
I would be very grateful if someone could help me please.
I have designed a user control and I would have inserted it on a aspz page
(WebForm1). The User control is being used to help with the navigation
through a datagrid. The control handles all the paging issues and on the
webform I do all the DataBinding.
My problem is that at the end of code of an on-click event for a link button
on my user control (DataGridNavigation.ascx) I need to call the DataBind
Method. The problem is that the DataBind method is sitting on the WebForm1
code behind page.
Here is a part of my code on the Code behind in the user control (ascx.cs
file) and commented is here I need to call the DataBind method.
private void No1_Click(object sender, System.EventArgs e)
{
_currentPageNumber = int.Parse(No1.Text);
this.CurrentPage.Text = _currentPageNumber.ToString();
ShowHideNavigation();
/*Need to call the DataBind method in here somehow
This DataBind Method is sitting on the WebForm1 code behind page*/
}
I would be very grateful if someone could help me please.