DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 14 Aug 2007 15:26:05 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Alex Maghen am
          2    Sergey Poberezovskiy
                 3    (Steven Cheng[MSFT])


enctype="multipart/form-data" for MasterPage   
I have a MasterPage. The MasterPage actually contains the <form> tag which is 
used throughout the site.

On just certain pages that use that MasterPage, I need the "enctype" for the 
<form> tag to be set to:
   enctype="multipart/form-data"

On the rest of the pages, I do not need this.

How can my specific ASPX page that uses the MasterPage change the 
MasterPage's <form enctype=...> just for that page? Or is there a better way?

Alex
Date:Tue, 14 Aug 2007 15:26:05 -0700   Author:  

RE: enctype="multipart/form-data" for MasterPage   
just set it in code behind inside the pages where it needs to be set:

this.Form.Enctype = "multipart/form-data";


"Alex Maghen" wrote:


> I have a MasterPage. The MasterPage actually contains the <form> tag which is 
> used throughout the site.
> 
> On just certain pages that use that MasterPage, I need the "enctype" for the 
> <form> tag to be set to:
>    enctype="multipart/form-data"
> 
> On the rest of the pages, I do not need this.
> 
> How can my specific ASPX page that uses the MasterPage change the 
> MasterPage's <form enctype=...> just for that page? Or is there a better way?
> 
> Alex
Date:Tue, 14 Aug 2007 18:18:01 -0700   Author:  

RE: enctype="multipart/form-data" for MasterPage   
Hi Alex,

As Sergey has suggested, you can use code to programmatically set the 
attributes of <form> tag. And you can put the code in a proper page event 
such as "Init" event. e.g.

==========
public partial class test_TestContentPage : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
        this.Form.Enctype = "multipart/form-data";
    }
........
============

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Wed, 15 Aug 2007 06:31:51 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us