Thanks all of you.
"Juan T. Llibre" <nomailreplies@nowhere.com> ¼¶¼g©ó¶l¥ó·s»D:uzuFZunJGHA.524@TK2MSFTNGP09.phx.gbl...
> Franz,
>
> Like Peter suggested, convert your menu.aspx file to a user control
> (menu.ascx).
> Then, you'll be able to include it real easily.
>
> Here's a tutorial which shows how to convert a web form into a user
> control :
>
>
http://msdn2.microsoft.com/en-us/library/2x6sx01c.aspx >
> Follow the directions in it and you'll be home free.
>
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> ASPNETFAQ.COM :
http://www.aspnetfaq.com > ==================================
> "Franz" <franzwong@i-hate-spam.com> wrote in message
> news:epEvKpnJGHA.1028@TK2MSFTNGP11.phx.gbl...
>> Peter,
>>
>> I have to include a aspx file (a menu) inside a normal web page. However,
>> the menu is only included under some conditions.
>>
>> <%
>> if (/* some condition */) {
>> %>
>> <!-- #include virtual="menu.aspx" -->
>> <%
>> }
>> %>
>>
>> I want to make the above to the following.
>>
>> <%
>> if (/* some condition */) {
>> Something.Include("Menu.aspx");
>> }
>> %>
>>
>> Franz
>>
>> "Peter Bromberg [C# MVP]" <pbromberg@yahoo.nospammin.com> ¼¶¼g©ó¶l¥ó·s»D:15A32669-4294-4ADC-A3BC-5B21F2361F3F@microsoft.com...
>>> Franz,
>>> Normally in ASP.NET the "include" function is performed with
>>> UserControls
>>> (ascx). Perhaps if you could be more specific about what you mean by
>>> "include
>>> an aspx file inside a script-block"? What is the goal here?
>>> Peter
>>>
>>> --
>>> Co-founder, Eggheadcafe.com developer portal:
>>>
http://www.eggheadcafe.com >>> UnBlog:
>>>
http://petesbloggerama.blogspot.com >>>
>>>
>>>
>>>
>>> "Franz" wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to include a aspx file inside a script-block, however, I
>>>> don't
>>>> want to include that file by <!-- #include virtual="whateverfile" -->.
>>>> How
>>>> can I do it?
>>>>
>>>> Thanks.
>>>> Franz
>>>>
>>>>
>>>>
>>
>>
>
>