abhinandan
unread,Jun 17, 2008, 12:43:38 AM6/17/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
protected void btSend_Click(object sender, EventArgs e)
{
if (lstbox1.SelectedIndex > -1)
{
foreach (ListItem ls in lstBox1.Items)
{
if (ls.Selected == true)
{
int allid = int.Parse(ls.Value);
bool res = islstEmpAllExists(allid, lstbox2);
if (!res)
{
lstbox2.Items.Add(ls);
}
else
{
ScriptManager.RegisterStartupScript(this.Page, typeof(String),
"errall", "alert('Allergy already exists');", true);
}
}
}
}
else
{
ScriptManager.RegisterStartupScript(this.Page,
typeof(String), "errall1", "alert('Select one item from the allergy
list');", true);
}
}
public Boolean islstEmpAllExists(int allid, ListBox lstempall)
{
Checking if there is any duplicate entry and return true or
false.
> Abhinandan- Hide quoted text -
- Show quoted text -