Question How to Declare Or use Reference Object Or value

aslamhadfa

New member
Joined
Aug 9, 2008
Messages
1
Programming Experience
Beginner
I'm trying to develope WebUserControl in which
WebUserControl access the grid object by reference and manipulates

but object received ByRef is type of private access
i want to use that reference object as public access

here is the code for user control

VB.NET:
Public Function setData_Grid_and_SqlQry(ByRef Err_lbl As Label, ByRef dg As DataGrid, ByRef sql As String)
        dg.AllowCustomPaging = True
        dg.AllowPaging = True
        dg.PagerStyle.Mode = PagerMode.NumericPages
        Err_lbl.Text = dm.BindData(Page, dg, sql, 1)
End Function


i need to use referance objects Err_lbl,dg,sql for another events


Plzzzzzzzzz Help Me Out Of This Thanx.............. In Advance
 
ASP.Net pages will be destroyed after it is called. So, ByRef is not very useful in ASP.Net pages. If you want to reuse object in ASP.Net pages, keep them in Session or ViewState.
 
Back
Top