Tuesday, May 25, 2010

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.

changed this
<asp:scriptmanager id="ScriptManager1" runat="server"></asp:scriptmanager>
to this
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">cc1:ToolkitScriptManager>

Problem solved.




Locating the Component services manager in Vista

Com (plus) is not dead (yet). But the component services manager seems to have disappeared from the administrative tools in the Vista control panel. Nevertheless you can start the management console straight from windows\System32\comexp.msc.

or Run >>>  comexp.msc

The flowed transaction could not be unmarshaled. The following exception occurred: The MSDTC transaction manager's WS-AtomicTransaction protocol service 'Version10' is disabled and cannot unmarshal incoming transactions.

Marshal/Unmarshal problem in Ventura

01. Control pane------; Administrative Tools----; Component Services
02. Component Service----------Computers--------;My Computer
03. Right Click-------Properties-------MSDTC tab------;Security Configuration---------;allow Remote Clients

Monday, April 26, 2010

Capturing Enter Key Press in Text Box ASP.NET Web Application

Copy This Java Script:

function test(e) {
e = e || window.event;
alert(e.keyCode);
if (e.keyCode == "13") {

document.getElementById("Text1").value = "13";
}
}




-----------------------------------------------------------------------------

In .aspx Page Add Particular Text box within div tag and place hidden input .

< div onkeydown="test(event)" >

< asp:textbox autopostback="true" id="TextBox1" ontextchanged="TextBox1_TextChanged" runat="server" > </asp:textbox >
<input  id="Text1" runat="server" type="text" />
</div>
<asp:textbox id="TextBox2" runat="server"></asp:textbox>


Also add the ontextchanged event in Text Box.

------------------------------------------------------------------------------

In .ascx.cs Page Within the TextChanged Event add follows .

protected void TextBox1_TextChanged(object sender, EventArgs e)
{
if( Text1.Value=="13")
{
Text1.Value = "";
//ENTER YOUR CODE
TextBox2.Text = "Enter Key";

}
}

Tuesday, April 20, 2010

Set Active Tab in Ajax tab Panel When validate is fire

You can simplify this java script for doing this.

function SetActiveTab() {

if (typeof (Page_Validators) == "undefined") return false;

try {

var noOfValidators = Page_Validators.length;

for (var validatorIndex = 0; validatorIndex <>

var validator = Page_Validators[validatorIndex];

ValidatorValidate(validator);

if (!validator.isvalid) {

validator=document.getElementById(validator.id);

var parentTab=validator;

var parentTabNodeName=validator;

do {

parentTabNodeName=parentTab.parentNode.nodeName;

parentTab=parentTab.parentNode;

} while ((parentTabNodeName!='DIV')||($find(parentTab.id)==null)||($find(parentTab.id)=='')||(parentTab.className !='ajax__tab_panel'));

if((parentTab.className =='ajax__tab_panel')){

var tabPanel = $find(parentTab.id);

var tabContainer =tabPanel.get_owner();

tabContainer.set_activeTabIndex(tabPanel.get_tabIndex());

}

break;

}

}

return false;

}

catch (Error) {

}

}


Call button click (In asp button On client Click)