Click here to Skip to main content
15,886,791 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
hi while i clicking button for click event it goes for design page i can't able to type coding on code behind. please give me solution for this
The below coding for your reference,

<%@ Page Title="" Language="C#" MasterPageFile="~/PHR.master"AutoEventWireup="true" CodeFile="RoleBasedDataAccess.aspx.cs" Inherits="RoleBasedDataAccess" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<script  runat="server">

    protected void F_Encrypt_Click(object sender, EventArgs e)
    {

    }
</script>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   
    <p>
    </p>
   
    <cc1:TabContainer ID="TabContainer1"  runat="server" ActiveTabIndex="0" 
        Height="393px" ScrollBars="Horizontal" Width="977px" 
         öndatabinding="Page_Load" style="margin-right: 201px">
        <cc1:TabPanel   runat="server" ID="TabPanel1">
<HeaderTemplate>Role Based Data Access</HeaderTemplate>
  <contenttemplate>  
    <table class="style4">
        <tr>
            <td class="style10"> </td>
            <td class="style11">
                <asp:Label 
            ID="Label7" runat="server" Text="select Patient ID">              
                <asp:DropDownList ID="Dddl_pid" runat="server" 
                DataSourceID="SqlDataSource1" DataTextField="Pat_Id" DataValueField="Pat_Id">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:heartConnectionString5 %>" 
                SelectCommand="SELECT [Pat_Id] FROM [patient]">
                <asp:Label ID="Label4" runat="server" 
                Text="If you need to take census need not to select patient ID" 
            Font-Names="Colonna MT" ForeColor="#6600FF"></td>
            <td class="style9">Welcome! <asp:Label ID="lbhname" runat="server"> Administrator</td>
          </tr><tr>
               <td class="style5"><br /></td>
               <td class="style13">
                   <asp:Label ID="Label3" runat="server" Text="Select Access"> 
                   <asp:DropDownList ID="DDL_access"  runat="server">              
                        <asp:ListItem>---Select Access---         
                        <asp:ListItem>AD
                        <asp:ListItem>DT
                        <asp:ListItem>PT
                        <asp:ListItem>RS
                        <asp:ListItem>CD
                        <asp:ListItem>FM
                        <asp:ListItem>EM
  <asp:DropDownList ID="ddl_disease" runat="server" 
                        DataSourceID="SqlDataSource2" DataTextField="Pat_Disease" 
                        DataValueField="Pat_Disease"><asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:heartConnectionString6 %>" 
                        SelectCommand="SELECT distinct [Pat_Disease] FROM [patient]"><br /><asp:Label ID="Label6" runat="server" Text="Select File for Encrypt"> <asp:FileUpload ID="FileEncrypt" runat="server" /><br /><br /><asp:Button 
            ID="F_Create" runat="server" OnClick="F_Create_Click" Text="File Create" /> <asp:Button 
            ID="F_View" runat="server" OnClick="F_View_Click" Text="View" /><asp:Button 
            ID="F_Encrypt" runat="server" OnClick="F_Encrypt_Click" Text="Encryption" /> <asp:Button 
            ID="F_Decrypt" runat="server" Text="Decryption" /></td><td> </td><td class="style5"><br /><br /></td><td> </td></tr><tr><td class="style5"> </td><td class="style6" colspan="2"><asp:Panel ID="Panel1" runat="server" ScrollBars="Vertical" Width="818px"><asp:GridView ID="GridView1" runat="server" Width="817px"></td></tr></table></contenttemplate>
        
        <cc1:TabPanel ID="TabPanel2"  runat="server" HeaderText="Fine Grained Data Access"><HeaderTemplate>Fine Grained Data Access</HeaderTemplate><contenttemplate><asp:Panel 
            ID="Panel2" runat="server" Height="359px"><asp:Button ID="View_Finegrained" 
            runat="server" onclick="View_Finegrained_Click" Text="View" /><asp:GridView 
            ID="GridView2" runat="server"></contenttemplate>
        
        <cc1:TabPanel ID="TabPanel3"  runat="server" HeaderText="Break Glass Data Access"><contenttemplate><asp:Label 
                ID="Label8" runat="server" Text="Select Patient ID">   <asp:DropDownList 
                ID="DDL_PAT_ID" runat="server"><br /><br />      <asp:Button 
                ID="Break_glass" runat="server" Height="54px" onclick="Break_glass_Click" 
                Text="SEND TO EMERGENCY DEPARTMENT" Width="307px" /></contenttemplate>
Posted
Updated 4-Feb-14 5:34am
v2
Comments
Sergey Alexandrovich Kryukov 4-Feb-14 11:28am    
This question has nothing to do with software development. You are just struggling with Visual Studio or something. In runtime, there are no "design pages". That said: probably you did not even run your application. :-)
—SA
ZurdoDev 4-Feb-14 11:46am    
Did you perhaps create this page manually and then later add the codebehind file?

1 solution

When you are adding new page.i.e wnen you right click on project and click on add new item, in that you select .aspx page , on same screen there is a check box for "Place code in seperate file "checck that checkbox, your problem will solve
 
Share this answer
 
Comments
ananth2012 5-Feb-14 1:45am    
i alrady write coding for that button event. after some day i open that same project page while i click that button its goes to design page. it does not goes for already written code behid side. this is my problem please give me solution
[no name] 5-Feb-14 1:51am    
Please check your codebeind file name is corrrect in Page tag
CodeBehind="SupplierAnalysisReport.aspx.cs"
[no name] 5-Feb-14 1:53am    
Or check the inherite attribute is correct in page tag
ananth2012 5-Feb-14 2:08am    
I checked that also correct. previously working that page after some day while open the issue raised. i don't know why this happen
[no name] 5-Feb-14 2:20am    
Please can you put your cs file's partial code of the top

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