Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is the usage of javascript in asp.net....how it work
Posted
Comments
Sergey Alexandrovich Kryukov 6-Sep-12 2:56am    
There is no such thing as "Java script". Java is not a scripting language and has nothing to do with JavaScript.
--SA

1 solution

Google before you post. Answers to these type of general questions can be found on the internet with a simple google search. If you face any specific issues , then post here. Also do read the instructions before asking the question

What is javascript ?[^]
 
Share this answer
 
Comments
__PP__ 6-Sep-12 3:44am    
ok please give solution for my specific issue

I used Checkboxlist with textbox popupcontols for multi selection dropdownlist and selected items text displayed in the text box.which is work in google chrome...but does not work in firefox....selected item does not displayed in text box in the firefox browser

Here is my coding

Multicheckcombo.ascx

Collapse | Copy Code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MultiCheckCombo.ascx.cs" Inherits="Mobius.D2K.Web.Administration.Modules.MultiCheckCombo" %>


<script type = "text/javascript">
//Script para incluir en el ComboBox1 cada item chekeado del chkListMateriales
function CheckItem(checkBoxList) {


var options = checkBoxList.getElementsByTagName('input');
var arrayOfCheckBoxLabels = checkBoxList.getElementsByTagName('label');
var s = "";

for (i = 0; i < options.length; i++) {
var opt = options[i];

if (opt.checked) {

s = s + ", '" + arrayOfCheckBoxLabels[i].innerText.replace("'", "''") + "'";

}
}
if (s.length > 0) {
s = s.substring(2, s.length); //sacar la primer 'coma'
}

var TxtBox = document.getElementById("<%=txtCombo.ClientID%>");
TxtBox.value = s;
document.getElementById('<%=hidVal.ClientID %>').value = s;
}
</script>



<asp:TextBox ID="txtCombo" runat="server" ReadOnly="True" Width="200"
Font-Size="Large" ForeColor="#660033">
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender111" runat="server"
TargetControlID="txtCombo" PopupControlID="Panel111" Position="Bottom" >


<input type="hidden" name="hidVal" id="hidVal" runat="server" />

<asp:Panel ID="Panel111" runat="server" style="vertical-align:top;" ScrollBars="Vertical" Width="250" Height="150" BackColor="AliceBlue" BorderColor="Gray" BorderWidth="1">

<asp:CheckBoxList ID="chkList" AutoPostBack ="true"
runat="server"
Height="150" onclick="CheckItem(this)">









Multicheckcombo.ascx.cs



Collapse | Copy Code

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Odbc;
using Mobius.D2K.Common.Utils;
using Mobius.D2K.Common.Utils.Html;
using System.Data.SqlClient;

namespace Mobius.D2K.Web.Administration.Modules
{
public partial class MultiCheckCombo : BaseMobiusAdministrationUserControl
{

protected void Page_Load(object sender, EventArgs e)
{

}

///


///Set the Width of the CheckBoxList

///


public int WidthCheckListBox
{
set
{
chkList.Width = value;
Panel111.Width = value + 20;
}
}
///
/// Set the Width of the Combo
///

public int Width
{
set { txtCombo.Width = value; }
get { return (Int32)txtCombo.Width.Value; }
}
public bool Enabled
{
set { txtCombo.Enabled = value; }
}
///
/// Set the CheckBoxList font Size
///

public FontUnit fontSizeCheckBoxList
{
set { chkList.Font.Size = value; }
get { return chkList.Font.Size; }
}
///
/// Set the ComboBox font Size
///

public FontUnit fontSizeTextBox
{
set { txtCombo.Font.Size = value; }
}



///
/// Add Items to the CheckBoxList.
///
Anuja Pawar Indore 6-Sep-12 4:34am    
Use improve question link and post your code there

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900