[Mono-aspnet-list] calling Response.Write() from a nested type

Alberto León leontiscar at gmail.com
Wed Aug 10 12:54:37 EDT 2011


Sure you want to do this?
Are you thinking to use user controls?

The same page call Renders the users controls and you do not need to call
response.write for any nested type...

I think you are wrong!

2011/8/10 mostafaxx <mostafa_alshrief at yahoo.com>

> hello every one,,
>
> I’m trying to call Response.Write() from a method defined in a class called
> application defined in another page called
> application.aspx :
>
> i have a main index page that references another page using :
> /<%@ Reference Page="libs/application.aspx"%>/
>
> the application.aspx has a class called application
> the application class has a method called
> /public void draw_page_head()/
>
> however when i try to call draw_page_head from the index page :
> /application.draw_page_head();/
>
> i get a compiler error
>
> Compiler Error Message: CS0038: Cannot access a nonstatic member of outer
> type `System.Web.UI.Page' via nested type
> `ASP.asp_mostafa_software_libs_application_aspx.application'
>
> Source Error:
>
> Line 6:                 public void draw_page_head()
> Line 7:                 {
> /Line 8:                        Response.Write(/
> Line 9:                         "<html>" +
> Line 10:                        "       <head><title>" + title +
> "</title></head>" +
>
> i really want to be able  to use Response.Write() or any thing equal to
> echo() in php
> from my class application
>
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/calling-Response-Write-from-a-nested-type-tp3733477p3733477.html
> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110810/5e67af10/attachment.html 


More information about the Mono-aspnet-list mailing list