aspx_beginners thread: "inaccessible due to its protection level"
Message #1 by =?iso-8859-1?Q?Oddur_Sn=E6r_Magn=FAsson?= <oddur@n...> on Mon, 18 Feb 2002 08:49:19 -0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0053_01C1B859.271CE610
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Why am i getting this error.
Compiler Error Message: CS0122:
'System.Web.UI.WebControls.DataGridPageChangedEventArgs.newPageIndex' is
inaccessible due to its protection level
I am trying to change the CurrentPageIndex on a datagrid.
the code is :
Line 17: protected void PageIndexChanged_OnClick(Object sender,
DataGridPageChangedEventArgs e){
Line 18: dgBlogg.CurrentPageIndex =3D e.newPageIndex;
Line 19: BindData();
Line 20: }
- oddur magnusson.is
Message #2 by "Olav Benum" <wrox@b...> on Mon, 18 Feb 2002 17:13:59
|
|
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0053_01C1B859.271CE610
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Why am i getting this error.
>
> Compiler Error Message: CS0122:
> 'System.Web.UI.WebControls.DataGridPageChangedEventArgs.newPageIndex' is
> inaccessible due to its protection level
>
> I am trying to change the CurrentPageIndex on a datagrid.
Search for newPageIndex at M$ cite:
http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp
gives
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpref/html/frlrfSystemWebUIWebControlsDataGridPageChangedEventArgsClassN
ewPageIndexTopic.asp
:
[Visual Basic]
Public ReadOnly Property NewPageIndex As Integer
[C#]
public int NewPageIndex {get;}
************
I.e. this is a read only property.
Olav
Message #3 by Elissa Setarehshenas <elissasetareh@y...> on Tue, 19 Feb 2002 06:03:24 -0800 (PST)
|
|
Oddur,
Try using
public void PageIndexChanged_OnClick(Object sender,
DataGridPageChangedEventArgs e)
I get that error for different reasons and somtimes
making the function pulic works but sometimes it
doesn't
Elissa
--- Oddur_Snær_Magnússon <oddur@n...> wrote:
> Why am i getting this error.
>
> Compiler Error Message: CS0122:
>
'System.Web.UI.WebControls.DataGridPageChangedEventArgs.newPageIndex'
> is inaccessible due to its protection level
>
> I am trying to change the CurrentPageIndex on a
> datagrid.
>
> the code is :
>
>
> Line 17: protected void
> PageIndexChanged_OnClick(Object sender,
> DataGridPageChangedEventArgs e){
> Line 18: dgBlogg.CurrentPageIndex
> e.newPageIndex;
> Line 19: BindData();
> Line 20: }
>
>
> - oddur magnusson.is
>
>
>
>
>
> $subst('Email.Unsub').
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
|