Click here to Skip to main content
15,906,626 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Gridview Pin
MinhajuddinK11-May-07 17:24
MinhajuddinK11-May-07 17:24 
GeneralRe: Gridview Pin
A kamath11-May-07 18:59
A kamath11-May-07 18:59 
QuestionSecurity Exception .. PLz Help Pin
deepaks35-May-07 22:14
deepaks35-May-07 22:14 
AnswerRe: Security Exception .. PLz Help Pin
Guffa6-May-07 3:35
Guffa6-May-07 3:35 
QuestionInserting new values to checkboxlist in Jaavascript Pin
Mahdi.Jabbari5-May-07 21:39
Mahdi.Jabbari5-May-07 21:39 
AnswerRe: Inserting new values to checkboxlist in Jaavascript Pin
Anbuselvan5-May-07 21:49
Anbuselvan5-May-07 21:49 
QuestionRe: Inserting new values to checkboxlist in Jaavascript Pin
Mahdi.Jabbari5-May-07 22:11
Mahdi.Jabbari5-May-07 22:11 
AnswerRe: Inserting new values to checkboxlist in Jaavascript Pin
Anbuselvan6-May-07 0:12
Anbuselvan6-May-07 0:12 
You are right! Smile | :)

Here is a JavaScript sample.

Markup Part:
=========
<head runat="server">
<script type="text/javascript">
function AddMoreItems()
{
var newNode = null;
var objList = document.getElementById('CheckBoxList1');
if (objList != null)
{
var tblBody = objList.getElementsByTagName('TBODY');
newNode = tblBody[0].rows[tblBody[0].rows.length-1].cloneNode(true);
if (newNode != null)
tblBody[0].appendChild(newNode);
}
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
</asp:CheckBoxList>
<asp:Button runat="server" Text="Add" ID="submitBtn" />
</div>
</form>
</body>

Code Behind Part:
=============
protected void Page_Load(object sender, EventArgs e)
{
CheckBoxList1.Items.Add(new ListItem("Hello"));
CheckBoxList1.Items.Add(new ListItem("Welcome"));
submitBtn.Attributes.Add("onclick", "return AddMoreItems();");
}

I hope you got some idea!

Enjoy!



P.Anbuselvan
IT Consultant
Emirates Group IT, UAE
AnswerRe: Inserting new values to checkboxlist in Jaavascript Pin
Blumen6-May-07 18:24
Blumen6-May-07 18:24 
GeneralRe: Inserting new values to checkboxlist in Jaavascript Pin
Blumen6-May-07 19:02
Blumen6-May-07 19:02 
QuestionHow to access Password in C# code. Pin
MinhajuddinK5-May-07 19:09
MinhajuddinK5-May-07 19:09 
AnswerRe: How to access Password in C# code. Pin
Chetan Ranpariya7-May-07 21:53
Chetan Ranpariya7-May-07 21:53 
QuestionWhat is the best way to write Data Control code in ASP.NET Pin
MinhajuddinK5-May-07 19:01
MinhajuddinK5-May-07 19:01 
AnswerRe: What is the best way to write Data Control code in ASP.NET Pin
Blumen6-May-07 19:43
Blumen6-May-07 19:43 
Questionconfirmation dialog in asp.net Pin
houcem.info5-May-07 18:06
houcem.info5-May-07 18:06 
AnswerRe: confirmation dialog in asp.net Pin
enjoycrack5-May-07 18:41
enjoycrack5-May-07 18:41 
Questionabout datagrid Pin
Hamsika rani5-May-07 14:41
Hamsika rani5-May-07 14:41 
AnswerRe: about datagrid Pin
enjoycrack5-May-07 17:12
enjoycrack5-May-07 17:12 
QuestionLosing "Role" Information across applications Pin
geturcodeon5-May-07 6:29
geturcodeon5-May-07 6:29 
Questionproblem to Show "Sending ..." for OnClientClick in my button. Pin
hdv2125-May-07 2:48
hdv2125-May-07 2:48 
AnswerRe: problem to Show "Sending ..." for OnClientClick in my button. Pin
Guffa5-May-07 11:08
Guffa5-May-07 11:08 
GeneralRe: problem to Show "Sending ..." for OnClientClick in my button. Pin
hdv2125-May-07 14:28
hdv2125-May-07 14:28 
AnswerRe: problem to Show "Sending ..." for OnClientClick in my button. Pin
Guffa5-May-07 16:34
Guffa5-May-07 16:34 
GeneralRe: problem to Show "Sending ..." for OnClientClick in my button. Pin
RSArockiam5-May-07 23:31
RSArockiam5-May-07 23:31 
QuestionMaster Detail in asp.net & Transaction Pin
aransiola5-May-07 0:23
aransiola5-May-07 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.