Microsoft Technology, .Net, BizTalk, Sharepoint & etc.

Liedong(Ken) Zheng, Senior SharePoint Developer at SIMPLOT

Archive for July 3rd, 2008

Validator and AJAX Tab

Posted by ken zheng on July 3, 2008

In this example, I use AJAX Tab and has RequiredFieldValidator in eacy tab. The challenge is I need to tell which validator is invalid and the container Tab is selected.
The parameter 0 is the RequiredFieldValidator , 1 is the tab control and 2 is the index

String js = string.Format(“if(document.getElementById(‘{0}’).isvalid ==false)$get(‘{1}’).control.set_activeTabIndex({2})”,cvlCategories.ClientID, tbcItemDetails.ClientID,1);
btnSave.Attributes.Add(“OnClick”, js);

Posted in VS2008 | 1 Comment »