473,551 Members | 2,803 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckBoxList Control nullReferance Exception

I keep getting the following error message when I try to iterate through a
CheckBoxList control:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.

Source Error:
Line 65: {
Line 66: int i;
Line 67: int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);
Line 68:
Line 69: for(i=0; i<a; i++)
Source File: c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s
Line: 67

Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
Sonar3.Secured. Controls.ImgCon trol.Delete_Cli ck(Object sender, EventArgs
e) in c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s:67
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()

The following is the page code:

<table>
<TBODY>
<tr>
<td>
<asp:repeater id="imgRep" runat="server">
<HeaderTemplate >
<table>
</HeaderTemplate>
<ItemTemplate >
<tr class="txtTitle ">
<td><%# DataBinder.Eval (Container.Data Item, "EventTitle")%> </td>
</tr>
<tr>
<td class="txtTitle ">Select the files you want to delete:</td>
</tr>
<tr>
<td><asp:CheckB oxList id="CheckBoxLis t1" DataSource='<%#
GetChildRelatio n(Container.Dat aItem,"EVNR_IMG ")%>' CssClass="txt"
DataValueField= "imgID" DataTextField=" ImgName" runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:repeater>
</td>
</tr>
<tr>
<td><P align="right">< asp:Button ID="ImgDelete" Text="Delete"
OnClick="Delete _Click" Runat="server"> </asp:Button></P></td>
</tr>
</TBODY>
</table>
The Codebehind is as follows:
public class ImgControl : System.Web.UI.U serControl
{
protected System.Data.Sql Client.SqlConne ction clubconn;
protected System.Data.Sql Client.SqlDataA dapter clubAdapt;
protected System.Data.Dat aSet dsClub;
protected System.Web.UI.W ebControls.Repe ater imgRep;
//protected System.Web.UI.W ebControls.Chec kBoxList chkbximg;
protected System.Web.UI.W ebControls.Butt on ImgDelete;

// Image delete function from Database.
protected System.Data.Sql Client.SqlComma nd clubcmd;
protected System.Data.Sql Client.SqlParam eter imgParam;
protected System.Web.UI.W ebControls.Chec kBoxList CheckBoxList1;
string strclubconn=Con figurationSetti ngs.AppSettings["ConnectionStri ng"];

private void Page_Load(objec t sender, System.EventArg s e)
{
if(!IsPostBack)
{
BindData();
}
}
public void BindData()
{
int intEV=System.Co nvert.ToInt32(R equest.QueryStr ing["EVNRID"]);
string strclubevnrcmd= "SELECT EVNR_tbl.* FROM EVNR_tbl WHERE
EVNR_tbl.EVNRID =" + intEV;
string strclubimgcmd=" SELECT img_tbl.* FROM img_tbl";

clubconn=new SqlConnection(s trclubconn);
clubconn.Open() ;
dsClub=new DataSet();
clubAdapt=new SqlDataAdapter( strclubevnrcmd, clubconn);
clubAdapt.Fill( dsClub,"EVNR");
clubAdapt.Selec tCommand=new SqlCommand(strc lubimgcmd,clubc onn);
clubAdapt.Fill( dsClub,"IMG");

dsClub.Relation s.Add("EVNR_IMG ",
dsClub.Tables["EVNR"].Columns["EVNRID"],
dsClub.Tables["IMG"].Columns["EVNRID"],false);
dsClub.Relation s[0].Nested=true;

imgRep.DataSour ce=dsClub;
imgRep.DataMemb er="EVNR";
imgRep.DataBind ();
}
public void Delete_Click(ob ject sender, System.EventArg s e)
{
int i;
int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);

for(i=0; i<a; i++)
{
if(CheckBoxList 1.Items[i].Selected)
{
int intCheckValue=S ystem.Convert.T oInt32(CheckBox List1.SelectedV alue);
}
}
}
protected DataView GetChildRelatio n(object dataItem, string relation)
{
DataRowView drv=dataItem as DataRowView;
if(drv != null)
{
return drv.CreateChild View(relation);
}
else
{
return null;
}
}

nothing to fancy but I keep getting the nullreferance exception when I've
referanced the CheckBoxList control properly.

Can someone see where I went wrong? The checkboxlist displays properly.
Nov 19 '05 #1
3 2909
You can't just reference your CheckBoxList this way since it's in a template.
You need to find the CheckBoxList for the RepeaterItem you're in. I'd suggest
changing how you handle the event to something like this:

http://groups-beta.google.com/group/...7bcbd1d9b24188

And this also has a bit more code but it's not exactly the same as what you're
doing:

http://groups-beta.google.com/group/...8b5306e685b389

-Brock
DevelopMentor
http://staff.develop.com/ballen
I keep getting the following error message when I try to iterate
through a CheckBoxList control:

Object reference not set to an instance of an object. Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not
set to an instance of an object.

Source Error:

Line 65: {
Line 66: int i;
Line 67: int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);
Line 68:
Line 69: for(i=0; i<a; i++)
Source File:
c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s
Line: 67
Stack Trace:

[NullReferenceEx ception: Object reference not set to an instance of an
object.]
Sonar3.Secured. Controls.ImgCon trol.Delete_Cli ck(Object sender,
EventArgs
e) in c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s:67
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.R
aisePostBackEve nt(String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()
The following is the page code:

<table>
<TBODY>
<tr>
<td>
<asp:repeater id="imgRep" runat="server">
<HeaderTemplate >
<table>
</HeaderTemplate>
<ItemTemplate >
<tr class="txtTitle ">
<td><%# DataBinder.Eval (Container.Data Item,
"EventTitle")%> </td>
</tr>
<tr>
<td class="txtTitle ">Select the files you want to delete:</td>
</tr>
<tr>
<td><asp:CheckB oxList id="CheckBoxLis t1" DataSource='<%#
GetChildRelatio n(Container.Dat aItem,"EVNR_IMG ")%>' CssClass="txt"
DataValueField= "imgID" DataTextField=" ImgName" runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:repeater>
</td>
</tr>
<tr>
<td><P align="right">< asp:Button ID="ImgDelete" Text="Delete"
OnClick="Delete _Click" Runat="server"> </asp:Button></P></td>
</tr>
</TBODY>
</table>
The Codebehind is as follows:

public class ImgControl : System.Web.UI.U serControl
{
protected System.Data.Sql Client.SqlConne ction clubconn;
protected System.Data.Sql Client.SqlDataA dapter clubAdapt;
protected System.Data.Dat aSet dsClub;
protected System.Web.UI.W ebControls.Repe ater imgRep;
//protected System.Web.UI.W ebControls.Chec kBoxList chkbximg;
protected System.Web.UI.W ebControls.Butt on ImgDelete;
// Image delete function from Database.
protected System.Data.Sql Client.SqlComma nd clubcmd;
protected System.Data.Sql Client.SqlParam eter imgParam;
protected System.Web.UI.W ebControls.Chec kBoxList CheckBoxList1;
string
strclubconn=Con figurationSetti ngs.AppSettings["ConnectionStri ng"];

private void Page_Load(objec t sender, System.EventArg s e)
{
if(!IsPostBack)
{
BindData();
}
}
public void BindData()
{
int intEV=System.Co nvert.ToInt32(R equest.QueryStr ing["EVNRID"]);
string strclubevnrcmd= "SELECT EVNR_tbl.* FROM EVNR_tbl WHERE
EVNR_tbl.EVNRID =" + intEV;
string strclubimgcmd=" SELECT img_tbl.* FROM img_tbl";
clubconn=new SqlConnection(s trclubconn);
clubconn.Open() ;
dsClub=new DataSet();
clubAdapt=new SqlDataAdapter( strclubevnrcmd, clubconn);
clubAdapt.Fill( dsClub,"EVNR");
clubAdapt.Selec tCommand=new SqlCommand(strc lubimgcmd,clubc onn);
clubAdapt.Fill( dsClub,"IMG");
dsClub.Relation s.Add("EVNR_IMG ",
dsClub.Tables["EVNR"].Columns["EVNRID"],
dsClub.Tables["IMG"].Columns["EVNRID"],false);
dsClub.Relation s[0].Nested=true;
imgRep.DataSour ce=dsClub;
imgRep.DataMemb er="EVNR";
imgRep.DataBind ();
}
public void Delete_Click(ob ject sender, System.EventArg s e)
{
int i;
int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);
for(i=0; i<a; i++)
{
if(CheckBoxList 1.Items[i].Selected)
{
int
intCheckValue=S ystem.Convert.T oInt32(CheckBox List1.SelectedV alue);
}
}
}
protected DataView GetChildRelatio n(object dataItem, string
relation)
{
DataRowView drv=dataItem as DataRowView;
if(drv != null)
{
return drv.CreateChild View(relation);
}
else
{
return null;
}
}
nothing to fancy but I keep getting the nullreferance exception when
I've referanced the CheckBoxList control properly.

Can someone see where I went wrong? The checkboxlist displays
properly.


Nov 19 '05 #2
Sam:
NullReferenceEx ceptions are pretty easy to debug in my
opinion...Check BoxList1 doesn't exist. It doesn't exist because it's within
a repeater's item....you could do:

for (RepeaterItem item in imgRep.Items){
CheckBoxList c = (CheckBoxList)i tem.FindControl ("CheckBoxList1 ");
if (c != null){
//do stuff
}
}

Just guessing, but I take it you don't want to loop thorugh each item but
instead want to delete a specific one...in this case you must move the
button inside hte ItemTemplate and hook into the Repeater's ItemCommand
event..
Incidently, why Convert.ToInt32 the Count? it's already an int'

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"I am Sam" <Ia****@discuss ions.microsoft. com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
I keep getting the following error message when I try to iterate through a
CheckBoxList control:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.

Source Error:
Line 65: {
Line 66: int i;
Line 67: int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);
Line 68:
Line 69: for(i=0; i<a; i++)
Source File: c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s
Line: 67

Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
Sonar3.Secured. Controls.ImgCon trol.Delete_Cli ck(Object sender, EventArgs
e) in c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s:67
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()

The following is the page code:

<table>
<TBODY>
<tr>
<td>
<asp:repeater id="imgRep" runat="server">
<HeaderTemplate >
<table>
</HeaderTemplate>
<ItemTemplate >
<tr class="txtTitle ">
<td><%# DataBinder.Eval (Container.Data Item, "EventTitle")%> </td>
</tr>
<tr>
<td class="txtTitle ">Select the files you want to delete:</td>
</tr>
<tr>
<td><asp:CheckB oxList id="CheckBoxLis t1" DataSource='<%#
GetChildRelatio n(Container.Dat aItem,"EVNR_IMG ")%>' CssClass="txt"
DataValueField= "imgID" DataTextField=" ImgName" runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:repeater>
</td>
</tr>
<tr>
<td><P align="right">< asp:Button ID="ImgDelete" Text="Delete"
OnClick="Delete _Click" Runat="server"> </asp:Button></P></td>
</tr>
</TBODY>
</table>
The Codebehind is as follows:
public class ImgControl : System.Web.UI.U serControl
{
protected System.Data.Sql Client.SqlConne ction clubconn;
protected System.Data.Sql Client.SqlDataA dapter clubAdapt;
protected System.Data.Dat aSet dsClub;
protected System.Web.UI.W ebControls.Repe ater imgRep;
//protected System.Web.UI.W ebControls.Chec kBoxList chkbximg;
protected System.Web.UI.W ebControls.Butt on ImgDelete;

// Image delete function from Database.
protected System.Data.Sql Client.SqlComma nd clubcmd;
protected System.Data.Sql Client.SqlParam eter imgParam;
protected System.Web.UI.W ebControls.Chec kBoxList CheckBoxList1;
string strclubconn=Con figurationSetti ngs.AppSettings["ConnectionStri ng"];

private void Page_Load(objec t sender, System.EventArg s e)
{
if(!IsPostBack)
{
BindData();
}
}
public void BindData()
{
int intEV=System.Co nvert.ToInt32(R equest.QueryStr ing["EVNRID"]);
string strclubevnrcmd= "SELECT EVNR_tbl.* FROM EVNR_tbl WHERE
EVNR_tbl.EVNRID =" + intEV;
string strclubimgcmd=" SELECT img_tbl.* FROM img_tbl";

clubconn=new SqlConnection(s trclubconn);
clubconn.Open() ;
dsClub=new DataSet();
clubAdapt=new SqlDataAdapter( strclubevnrcmd, clubconn);
clubAdapt.Fill( dsClub,"EVNR");
clubAdapt.Selec tCommand=new SqlCommand(strc lubimgcmd,clubc onn);
clubAdapt.Fill( dsClub,"IMG");

dsClub.Relation s.Add("EVNR_IMG ",
dsClub.Tables["EVNR"].Columns["EVNRID"],
dsClub.Tables["IMG"].Columns["EVNRID"],false);
dsClub.Relation s[0].Nested=true;

imgRep.DataSour ce=dsClub;
imgRep.DataMemb er="EVNR";
imgRep.DataBind ();
}
public void Delete_Click(ob ject sender, System.EventArg s e)
{
int i;
int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);

for(i=0; i<a; i++)
{
if(CheckBoxList 1.Items[i].Selected)
{
int intCheckValue=S ystem.Convert.T oInt32(CheckBox List1.SelectedV alue);
}
}
}
protected DataView GetChildRelatio n(object dataItem, string relation)
{
DataRowView drv=dataItem as DataRowView;
if(drv != null)
{
return drv.CreateChild View(relation);
}
else
{
return null;
}
}

nothing to fancy but I keep getting the nullreferance exception when I've
referanced the CheckBoxList control properly.

Can someone see where I went wrong? The checkboxlist displays properly.

Nov 19 '05 #3
Hi Karl,

Actually I wanted to loop through and delete all the images that are checked
and skip those that aren't checked so I am going to have to loop through the
CheckBoxList.

"Karl Seguin" wrote:
Sam:
NullReferenceEx ceptions are pretty easy to debug in my
opinion...Check BoxList1 doesn't exist. It doesn't exist because it's within
a repeater's item....you could do:

for (RepeaterItem item in imgRep.Items){
CheckBoxList c = (CheckBoxList)i tem.FindControl ("CheckBoxList1 ");
if (c != null){
//do stuff
}
}

Just guessing, but I take it you don't want to loop thorugh each item but
instead want to delete a specific one...in this case you must move the
button inside hte ItemTemplate and hook into the Repeater's ItemCommand
event..
Incidently, why Convert.ToInt32 the Count? it's already an int'

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"I am Sam" <Ia****@discuss ions.microsoft. com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
I keep getting the following error message when I try to iterate through a
CheckBoxList control:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.NullRefe renceException: Object reference not set
to an instance of an object.

Source Error:
Line 65: {
Line 66: int i;
Line 67: int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);
Line 68:
Line 69: for(i=0; i<a; i++)
Source File: c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s
Line: 67

Stack Trace:
[NullReferenceEx ception: Object reference not set to an instance of an
object.]
Sonar3.Secured. Controls.ImgCon trol.Delete_Cli ck(Object sender, EventArgs
e) in c:\inetpub\wwwr oot\sonar3\secu red\controls\im gcontrol.ascx.c s:67
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
System.Web.UI.P age.ProcessRequ estMain()

The following is the page code:

<table>
<TBODY>
<tr>
<td>
<asp:repeater id="imgRep" runat="server">
<HeaderTemplate >
<table>
</HeaderTemplate>
<ItemTemplate >
<tr class="txtTitle ">
<td><%# DataBinder.Eval (Container.Data Item, "EventTitle")%> </td>
</tr>
<tr>
<td class="txtTitle ">Select the files you want to delete:</td>
</tr>
<tr>
<td><asp:CheckB oxList id="CheckBoxLis t1" DataSource='<%#
GetChildRelatio n(Container.Dat aItem,"EVNR_IMG ")%>' CssClass="txt"
DataValueField= "imgID" DataTextField=" ImgName" runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:repeater>
</td>
</tr>
<tr>
<td><P align="right">< asp:Button ID="ImgDelete" Text="Delete"
OnClick="Delete _Click" Runat="server"> </asp:Button></P></td>
</tr>
</TBODY>
</table>
The Codebehind is as follows:
public class ImgControl : System.Web.UI.U serControl
{
protected System.Data.Sql Client.SqlConne ction clubconn;
protected System.Data.Sql Client.SqlDataA dapter clubAdapt;
protected System.Data.Dat aSet dsClub;
protected System.Web.UI.W ebControls.Repe ater imgRep;
//protected System.Web.UI.W ebControls.Chec kBoxList chkbximg;
protected System.Web.UI.W ebControls.Butt on ImgDelete;

// Image delete function from Database.
protected System.Data.Sql Client.SqlComma nd clubcmd;
protected System.Data.Sql Client.SqlParam eter imgParam;
protected System.Web.UI.W ebControls.Chec kBoxList CheckBoxList1;
string strclubconn=Con figurationSetti ngs.AppSettings["ConnectionStri ng"];

private void Page_Load(objec t sender, System.EventArg s e)
{
if(!IsPostBack)
{
BindData();
}
}
public void BindData()
{
int intEV=System.Co nvert.ToInt32(R equest.QueryStr ing["EVNRID"]);
string strclubevnrcmd= "SELECT EVNR_tbl.* FROM EVNR_tbl WHERE
EVNR_tbl.EVNRID =" + intEV;
string strclubimgcmd=" SELECT img_tbl.* FROM img_tbl";

clubconn=new SqlConnection(s trclubconn);
clubconn.Open() ;
dsClub=new DataSet();
clubAdapt=new SqlDataAdapter( strclubevnrcmd, clubconn);
clubAdapt.Fill( dsClub,"EVNR");
clubAdapt.Selec tCommand=new SqlCommand(strc lubimgcmd,clubc onn);
clubAdapt.Fill( dsClub,"IMG");

dsClub.Relation s.Add("EVNR_IMG ",
dsClub.Tables["EVNR"].Columns["EVNRID"],
dsClub.Tables["IMG"].Columns["EVNRID"],false);
dsClub.Relation s[0].Nested=true;

imgRep.DataSour ce=dsClub;
imgRep.DataMemb er="EVNR";
imgRep.DataBind ();
}
public void Delete_Click(ob ject sender, System.EventArg s e)
{
int i;
int a=System.Conver t.ToInt32(Check BoxList1.Items. Count);

for(i=0; i<a; i++)
{
if(CheckBoxList 1.Items[i].Selected)
{
int intCheckValue=S ystem.Convert.T oInt32(CheckBox List1.SelectedV alue);
}
}
}
protected DataView GetChildRelatio n(object dataItem, string relation)
{
DataRowView drv=dataItem as DataRowView;
if(drv != null)
{
return drv.CreateChild View(relation);
}
else
{
return null;
}
}

nothing to fancy but I keep getting the nullreferance exception when I've
referanced the CheckBoxList control properly.

Can someone see where I went wrong? The checkboxlist displays properly.


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
7935
by: Bryce Budd | last post by:
Hello All, I've been a taker of information from newsgroups for a long time and thought I'd finally make a contribution back to the community whose supported me when I've needed it. After all before commercialization took over that was the beauty of the Internet! I've create a checkboxlist validator control...something MS should have...
3
5444
by: Robin Day | last post by:
I run some code on the changed event of checkbox lists. Its quite simple, nothing more than showing / hiding some other parts of the page. Using Autopostback and Server side code works fine, but is far too slow, especially if the users are on modems. I need to quite simply, add some java code to the onclick event of the input tags of a...
4
8063
by: dm_dal | last post by:
Is there a know issue surrounding the CheckBoxList control and it's viewstate? When my control is created, it's ListItems are checked as needed, but on a postback, they loose their Selected status. David
2
2373
by: Simon Cheng | last post by:
Hi, For the following form: <form runat="server"> <asp:checkboxlist id="list" runat="server"> <asp:listitem runat="server" value="Cash" /> <asp:listitem runat="server" value="Check" /> </asp:checkboxlist><br/> </form>
7
15625
by: bienwell | last post by:
Hi, I'm using the CheckBoxList control in ASP.NET for Web development. This checkboxlist is bound by the database. If we have more items for this checkbox list, it takes space on the page. I want to have vertical scroll bar (like CheckedListBox in Window development) to save space. Can we do that in ASP.NET ? Please give me your...
4
4032
by: Patrick.O.Ige | last post by:
I have a CheckBoxList in a DataList and i'm trying to get item Selected after doing a postBack. I have set my CheckBoxlist AutoPostBack="True" Any ideas what 'm doing wrong? It seems not to work:( Thanks My CheckBoxList in the DataList Below
0
2134
by: webmaster | last post by:
Hi all, I'm tearing my hair out with this one. I have successfully implemented by own RadioButtonList in order to provide additional functionality and a DIV rather than TABLE-based layout in one of my ASP.NET 1.1 web forms. This involves a fairly simple inheritance of the System.Web.UI.WebControls.RadioButtonList class, with some new...
0
1041
by: =?Utf-8?B?S04=?= | last post by:
I am getting the following exception in a page while using the Checkboxlist control. This happens on postback. startIndex cannot be larger than length of string. Parameter name: startIndex Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about...
6
3485
by: dbuchanan | last post by:
There are three parts to this 1.) How do I cascade menus? 2.) And, how do I cascade menus with a multi-select CheckBoxList?
0
7565
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7768
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6106
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1981
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
804
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.