Click here to Skip to main content
16,023,224 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<%@ Page  Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="Medicine-Details.aspx.cs" Inherits="CMS_Medicine_Details" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<script language="javascript" type="text/javascript">
    function disableEnterKey(e) {
        var key;
        if (window.event)
            key = window.event.keyCode; //IE
        else
            key = e.which; //firefox      

        return (key != 13);
    }

    function SearchAtKeyEnter(event) {
        if ((event.which == 13) || (event.keyCode == 13)) {
            var btnSearch = document.getElementById('<%=btncompoundSearch.ClientID%>');
            btnSearch.click();
        }
    }
    
     function StartProgressBar() {
         var myExtender = $find('ProgressBarModalPopupExtender');
         myExtender.show();
         return true;
     }
     
     function validation() {
         var txtmedicinename = document.getElementById('<%= txtmedicinename.ClientID %>');
         if (txtmedicinename.value == "" ) {
             alert("Please enter Medicine Name");
             txtmedicinename.focus();
             return false;
         }
         StartProgressBar();
     }        
</script>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
  
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release">

<table border="0" width="100%">
 <tr><td><div id="page-heading-1">Medicine Details</div> </td>
 </tr>
<tr>
<td>
    <asp:Label ID="lbl_msg" runat="server" Text="" CssClass="orange-bold" Visible="true"></td>
    </tr>
</table>
<table style="margin-removed10px;">

 <tr><td style="vertical-align:text-top"><span class="text-orange">*</span>
     <asp:Label ID="lblmedicinename" runat="server" Text="Medicine Name"></td>
     <td>
         <asp:TextBox ID="txtmedicinename" runat="server" Rows="3" TextMode="MultiLine" Width="200px">
     </td></tr>
     
     <tr>
     <td><asp:Label ID="lblform" runat="server" Text="Form"></td>
     <td><asp:TextBox ID="txtform" runat="server" Width="200px" onkeydown="return disableEnterKey(event)"></td>
     </tr>

     <tr>
     <td><asp:Label ID="lblPregnancy" runat="server" Text="Pregnancy"></td>
     <td>
         <asp:DropDownList ID="ddlPregnancy" runat="server" Width="200px">
         
         </td>
     </tr>
     
      <tr>
     <td><asp:Label ID="lblLactation" runat="server" Text="Lactation" Width="200px"></td>
     <td> <asp:DropDownList ID="ddlLactation" runat="server" Width="200px">
         </td>
     </tr>
     
      <tr>
     <td><asp:Label ID="lblLabInterference" runat="server" Text="Lab Interference"></td>
     <td>
         <asp:RadioButtonList ID="rdLabInterference" runat="server" RepeatDirection="Horizontal">
         <asp:ListItem Value="1">Yes
         <asp:ListItem Value="0" Selected="True">No
          
     </td>
     </tr>
     
      <tr>
     <td><asp:Label ID="lblFoodInterference" runat="server" Text="Food Interference"></td>
     <td>
        <asp:RadioButtonList ID="rdFoodInterference" runat="server" RepeatDirection="Horizontal">
         <asp:ListItem Value="1">Yes
         <asp:ListItem Value="0" Selected="True">No
          
     </td>
     </tr>

<tr>
<td>
    <asp:Label ID="lblcompound" runat="server" Text="Compound Names"></td>
    <td>
        <asp:Button ID="brnaddmore" runat="server" Text="Add More" CssClass="btnCommon" 
          OnClientClick="StartProgressBar();" onclick="brnaddmore_Click"  Width="80px" Height="22px"/>
                         
                            </td>
</tr>
<tr>
<td colspan="2">
<asp:UpdatePanel runat="server">
<contenttemplate>
<asp:GridView ID="gvcompound" runat="server"
           
                                      AlternatingRowStyle-CssClass="gridaltitem" AutoGenerateColumns="False" 
                                      CellPadding="4" CssClass="grid" DataKeyNames="CompoundId"
           
                                      HeaderStyle-CssClass="gridheadertable1" 
                                    onrowdeleting="gvcompound_RowDeleting"
                                      PagerStyle-HorizontalAlign="Right" PageSize="15" 
                                 RowStyle-CssClass="griditem" 
        onrowdatabound="gvcompound_RowDataBound">
                                      <rowstyle cssclass="griditem" />
                                    
                                      <columns>
                                      
                                         <asp:BoundField HeaderText="Compound Name" runat="server"  DataField="CompoundName"/>
         
          
                                         <asp:CommandField ShowDeleteButton="True" ButtonType="Button" ControlStyle-CssClass="btnCommon"/>

                                            
                                        
                                         
                                      </columns>
                                      
                                  
                                  </contenttemplate>
                                  
   
</td>
</tr>
<tr><td> </td><td></td></tr>
<tr><td></td><td> <asp:Button ID="btnsave" runat="server" 
        Text="Save" CssClass="btnCommon" onclick="btnsave_Click"  
       OnClientClick="return validation();" Width="100px" Height="25px"/></td></tr>
<tr><td colspan="2"> 
<asp:ModalPopupExtender ID="ProgressBarModalPopupExtender" runat="server" BackgroundCssClass="ModalBackground_2" behaviorID="ProgressBarModalPopupExtender"
                     TargetControlID="hiddenField" PopupControlID="Panel3" />
            <asp:Panel ID="Panel3" runat="server" Style="display: none; background-color: #FFFFFF;">
                 <img src="../Images/green-loader.gif" alt="Loader" />
                  <asp:HiddenField ID="hiddenField" runat="server" /></td>
                  </tr>
                  

</table>
  <asp:UpdatePanel ID="updpnlforDocPnllist" runat="server">
                 <triggers>
                 <asp:AsyncPostBackTrigger ControlID="brnaddmore" /></triggers>
               
                
                            <contenttemplate>
                            
                      <asp:HiddenField ID="hfCompoundID" runat="server" Value="0" />    
                    
                    
     <asp:Panel ID="pnlMainPopup" runat="server" style=" background-color:Transparent; border-width:medium; width:630px; height:450px;text-align:center; display:none;">
       <div style="margin:10px 10px 10px 10px">
                <asp:Panel ID="pnlDoctorChildPreveiw"  runat="server" Visible="true" ScrollBars="Auto"    style="color:Black; background-color:Azure; border-width:medium; vertical-align:middle;width:630px; height:430px;text-align:center;">                            
                         <table id="tbl_certi" align="center" style="margin-removed5px;" width="600px" cellpadding="0px" cellspacing="0px" border="0px">
                             <tr>
                             <td width="30%" align="left">
                             
                           
                            
                             <asp:Button ID="btnCancel" Text="Cancel" style="margin-left:520px;margin-top:2px;" CssClass="btnCommon" Width="74px" Height="24px" runat="server"  OnClick="btnCancel_Click"/> 
                             </td>
                             </tr>
                             
                             
                             <tr>
                                                                     
                           <td align="left">
                           <table width="95%" cellpadding="0" cellspacing="0" style=" border=" 0="><br mode=" hold=" />                      <tr><br mode=" 2=" align=" left="><span id=" page-heading-1-small=">Search Compound</span><br mode=" lblcname=" runat=" server=" Text=" compund="" name="></asp:Label><br mode=" txtcompoundname=" runat=" textbox=" Width=" 130px="  önkeydown=" btncompoundsearch=" runat=" search=" CssClass=" btncommon=" Height=" 27=" Width=" 84="<br mode=" btncompoundsearch_onclick=" /><br mode=" lblexitingusermsg=" runat=" text-orange=" ></asp:Label><br /><br mode=" gvpanelistcompoundlist=" runat=" true=" <br mode=" gridaltitem=" AutoGenerateColumns=" false=" <br mode=" 4=" CssClass=" grid=" DataKeyNames=" compoundid=" <br mode=" horizontal=" HeaderStyle-CssClass=" gridheadertable1=" <br mode=" gvpanelistcompoundlist_pageindexchanging="  Width=" 310px=" <br mode=" right=" PageSize=" 300=" RowStyle-CssClass=" griditem=" ><br mode=" numeric=" Position=" topandbottom=" /><br mode=" compound="" hrfcompoundname=" runat=" hrfcompound_click=" <br mode=" 50px=" /><br mode=" gridpagerstyle=" ForeColor=" black=" <br mode=" center=" /><br mode=" label2=" runat=" label="></asp:Label><br mode=" 0px=" cellspacing=" lbl_certiseq=" runat=" 12=" ForeColor=" white="></asp:Label><br mode=" mpe2=" behaviorID=" modalremoved=" CacheDynamicResults=" pnlmainpopup=" TargetControlID=" tgtctrl_alt2=" CancelControlID=" btncancel=" Enabled=" display:none=" /><br mode=" xmlns:display="#unknown"></table></td></tr></table></div></contenttemplate>
Posted
Updated 14-Mar-12 0:14am
v2
Comments
[no name] 14-Mar-12 6:15am    
Are we supposed to guess which line this occurs on?
Keith Barrow 14-Mar-12 8:52am    
You need to tell us where this is happening. My guess is something is trying to access the root node's parent (which is null) and causing your error, but without more information I for one can't tell.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900