Friday, July 19, 2013

Parse HTML Documents Easily with HtmlAgilityPack Using C#


Hi  Friend's....

In this article,  going  to  explain  how to prase and fetch the  html  page content  from web site's using HTMLAgility pack......!   



please go through below link to know more details


Prase Each Worksheet From Excel Worksheet Into DataSet Using C#

In this Post I will explain how to read each Worksheet From Excel File into a DataSet using C#.

please go through below link to know more details




InputFormTextBox Validation(Rich TextBox in Sharepoint)


InputFormTextBox Validation(Rich TextBox in Sharepoint)

In this post I will tell how to validate the InputFormTextBox contol using custom JavaScript function…if u Use  RequiredFieldValdator or InputFormRequiredFieldValidator with InputFormTextbox  U ll get some validation Issues Onclick Validation Button…Instead of RequiredFieldValidation  Just do with CustomValidator .

This is an example of Client-side validation Using Cutomvalidator…



<sharepoint:InputFormTextBox ID=”txtDetailInfoRequired” CausesValidation=”true”
AllowHyperlink=”true” RichText=”true” RichTextMode=”FullHtml” runat=”server” TextMode=”MultiLine” Rows=”6″ Columns=”10″ />
<asp:CustomValidator ID=”CustomeDetails” runat=”server” ValidationGroup=”validate”  ClientValidationFunction=”ValidationForRichDetails” ControlToValidate=”txtDetailInfoRequired” SetFocusOnError=”true” ValidateEmptyText=”true” Display=”Dynamic” ErrorMessage=”*”>

Inside  Javascript tag Define this function...

<script language=”javascript” type=”text/javascript”>
function ValidationForRichReason(source, arguments) {
var text = RTE_GetRichEditTextOnly(“<%= txtReasonofrequest.ClientID %>”);
if (text != “”) {
arguments.IsValid = true;
}
else {
//set focus back to the rich text editor.
RTE_GiveEditorFocus(“<%= txtReasonofrequest.ClientID %>”);
arguments.IsValid = false;
}
}
</script>


Onclick…Button…

<asp:Button ID=”btnSubmit” runat=”server” Text=”Submit”  CssClass=”nav_new” ValidationGroup=”validate” />

if any doubts please comments here...good luck