Skip to main content

Posts

c# list multiple data types

Recent posts

AJAX AUTOCOMPLETED

Code for AJAX AUTOCOMPLETED ----------------.aspx-------------- <asp:TextBox ID="txt_Narration" runat="server" Width="200px" OnTextChanged="txt_Narration_TextChanged" AutoPostBack="true"> </asp:TextBox>&nbsp; <div id="div_NARRATION"> </div> <cc1:AutoCompleteExtender runat="server" ID="AutoComplete_NARRATION" BehaviorID="autoCompleteNARRATION" TargetControlID="txt_Narration" ServicePath="~/webservices/CommonWebService.asmx" ServiceMethod="Get_Narration" MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="true" CompletionSetCount="12" CompletionListCssClass="AutoExtender" CompletionListItemCssClass="AutoExtenderList" CompletionListHighlightedItemCssClass="AutoExtenderHighlight" CompletionListElementID="div_NARRATION"> </cc1:AutoCompleteExtende

JAVASCRIPT ALERT ON CLASS PAGE

----------------.aspx-------------- JAVASCRIPT FUNCTION function alertClick(Details) { alert(Details) return false; } .CS     string alert = "Enter Atleast One Debit Type and One Credit Type Ledger"; RegisterClientScriptBlock("gridcount", "<script Language='javascript'>window.onload = function(){return alertClick('" + alert + "');}</script>"); return;  ---------------- OR protected void Page_Load(object sender, EventArgs e) {   string message = "Hello! Mudassar.";   System.Text.StringBuilder sb = new System.Text.StringBuilder();   sb.Append("<script type = 'text/javascript'>");   sb.Append("window.onload=function(){");   sb.Append("alert('");   sb.Append(message);   sb.Append("')};");   sb.Append("</script>");   ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString()); }  

Code for AJAX TEXTCHANGE WEBSERVICE CALL

----------------.aspx--------------    <script language="javascript" type="text/javascript">             function CallParametersPageMethod()     {        Branch_Abrv = document.getElementById('txt_search').value;        CommonWebService.Mai_Login_Branch(Branch_Abrv,onSucceeded,onFailed); // CommonWebService ? WEBSERVICE NAME // Mai_Login_Branch ? METHOD NAME FROM WEBSERVICE     }     function onSucceeded(result,userContext,methodName)     {         if(result!="")         {           document.getElementById('txt_search').value= result;         }        }     function onFailed(error,userContext,methodName)     {       alert("An error occurred");     }     </script> .ASPX <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference InlineScript="true" Path="~/webservices/CommonWebService.asmx" /> </Services> </asp:ScriptManager&

AJAX TAB CONTROL

<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <cc1:tabcontainer id="TabContainer1" runat="server" activetabindex="0" style="z-index: 18; left: 0px; top: 0px" width="100%" cssclass="ajax__myTab" backcolor="#FFFBD6"> <%--ledger details--%> <cc1:TabPanel ID="Tab_Ledger_Details" runat="server" HeaderText="Voucher Details" Width="100%" Style="text-align: left" BackColor="#FFFBD6"> <ContentTemplate> </ContentTemplate> </cc1:TabPanel> <%--vourcher details complet--%> <%--Bill and cost tab start--%> <cc1:TabPanel ID="Tab_Bill_Cost" runat="server" HeaderText="Bill and Cost Details" Width="100%" BackColor="#FFFBD6"> <ContentTemplate> </ContentTemplate> </cc1:TabPanel> <%--Bill and co