Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET Server
Hi,
 
I have called a Function GetPhotos() from Designer Page (source). Getphotos() is in Code-behind Page.
 
It runs well when I build the application but when I publish the same application using "fixedName and single page Assemblies" option Enable, it returns an error.
 
Compiler Error Message: CS0103: The name 'GetPhotos' does not exist in the current context.
 
What should I do?
 
Code in Design page :
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 

<asp:Panel ID="pn1" runat="server" GroupingText="Facility's">
 
<table width="100%">
<tr>
  <td style="text-align: removed">
     <asp:Label ID="Label2" runat="server" Height="100%" 
          style="font-size: 21pt; font-weight: 700; color: #996633" Width="100%">     
  </td>
</tr>
<tr><td style="text-align: removed"><asp:Label ID="Label3" runat="server" 
        style="text-align: justify"></td></tr>
<tr>
  <td>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" 
        CellPadding="4" PageSize="15" Width="100%" 
          onselectedindexchanged="GridView1_SelectedIndexChanged">
        <rowstyle backcolor="White" forecolor="#333333" />
        <footerstyle backcolor="White" forecolor="#333333" />
        <pagerstyle backcolor="#336666" forecolor="White" horizontalalign="Center" />
        <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
    
  <% 
      GetPhotos(Label2.Text);      
    %>
  </td>
</tr>
</table>
 
Thanks in advance.
Posted 16-Dec-10 1:22am
Edited 16-Dec-10 1:28am
Slacker00775.7K
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Function GetPhotos should be public.
  Permalink  
Comments
Ankur\m/ at 16-Dec-10 8:13am
   
Not necessary in this case. A private member will also be available to the aspx page.

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

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 16 Dec 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100