by Evgelen
14. January 2010 22:00

Error: Debugging Failed Because Integrated Windows Authentication Is Not Enabled
Authentication of the user requesting debugging could not be done due to an authentication error when attempting to step into a Web application or XML Web service. One cause of this error is that integrated Windows authentication is not enabled. To enable it, perform the following steps. If you have enabled integrated Windows authentication and this error still appears, then it is possible that this error is caused because Digest Authentication for Windows Domain Servers is enabled. In this situation you should consult with your network administrator. To enable integrated Windows authentication
- Log onto the Web server using an administrator account.
- On the Start menu, click Administrative Tools Control Panel.
- In the Administrative Tools window, double-click Internet Information Services.
- In the Internet Information Services window, open the Web server node. A Web Sites folder opens beneath the server name.
- You can configure authentication for all Web sites or for individual Web sites. To configure authentication for all Web sites, right-click the Web Sites folder and click Properties on the shortcut menu. To configure authentication for an individual Web site, open the Web Sites folder, right-click the individual Web site, and on the shortcut menu, click Properties.
- In the Properties dialog box, click the Directory Security tab.
- In the Anonymous access and authentication control section, click the Edit button.
- In the Authentication Methods dialog box, under Authenticated access, select Integrated Windows authentication.
- Click OK to close the Authentication Methods dialog box.
- Click OK to close the Properties dialog box.
- Close the Internet Information Services window.
by Evgelen
9. December 2009 18:14
Example
1. Client Side
2. Codebehind file
protected void btnSubmit_Click(object sender, EventArgs e)
{
const string script = "";
ClientScript.RegisterClientScriptBlock(GetType(),"ClientScript", script);
}
by Evgelen
28. September 2009 07:51
Task: You need to uncheck few items in checkbox list with multiple selection if someone selected specific item.
Example: You have four items in check box list Item 1, Item 2, Item 3 and Item 4. If someone select Item 4 it will uncheck the selected Item 1, Item 2, Item 3 and backward in case someone selected Item 1 or Item 2 or Item 3 it will uncheck Item 4.
Solution: You need to add the code right before body tag ends and change the listBoxId to the ID of your control. The function fires automatically for both Firefox and Internet Explorer browsers.
(function() {
if (document.getElementById('ControlId') != null) {
var ie = (document.all) ? true : false;
var ff = ((document.getElementById) && (!ie)) ? true : false;
if (ie) {
var selectListie =
document.getElementById('ControlId');
selectListie.onchange = function() { getSelected() };
}
if (ff) {
var selectListff =
document.getElementById('ControlId');
selectListff.setAttribute('onchange', 'getSelected();');
}
}
})();
function getSelected() {
var selectListff = document.getElementById('ControlId');
var selIndex = selectListff.selectedIndex;
if (selIndex != -1) {
var chkLista = document.getElementById("ControlId");
for (var i = 0; i < chkLista.length; i++) {
if (chkLista[0].selected || chkLista[1].selected || chkLista[2].selected) {
chkLista[3].selected = false
return;
}
}
}
by Evgelen
28. September 2009 07:46
Task: You need to validate a asp.net checkbox list with javascript.
Solution:
You need to create a asp.net custom validator and on client validation function (ClientValidationFunction="CheckExperince") call the JavaScript function below.
function CheckExperince(source, args) {
var checkList = document.getElementById('');
var checkListBox = checkList .getElementsByTagName("input");
for (var i = 0; i < checkListBox.length; i++) {
if (checkListBox[i].checked) {
args.IsValid = true;
return;
}
}
args.IsValid = false;
}
by Evgelen
28. September 2009 06:44
var TypeIndex = document.getElementById('').selectedIndex
var TypeValue = document.getElementById('').options[TypeIndex].value
if(TypeValue != ""){
//Do Something
}