Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

FileUpload Control returning File Name Null Value

$
0
0

Hi,

I am using UpdatePanel Control in asp.net 2.0,I added FileUpload Control In ItemTemplate.

at the page directive added  enableEventValidation="false"

<asp:TemplateColumn HeaderText="" ItemStyle-BorderStyle="None"
Visible="true">
<ItemTemplate>
<asp:PlaceHolder ID="phpostComments" runat="server" Visible="false">

<tr>
<td colspan="2">
<table border="0" >
<tr style="height:10px"></tr>
<tr>
<td width="16%">
</td>
<td valign="top">
<asp:TextBox ID="txtpostComments" Style="padding-right:10px" TextMode="MultiLine" Columns="38" Rows="2" runat="server" ></asp:TextBox>
</td>

<td valign="middle">
<asp:RequiredFieldValidator ID="rfvUserName1" EnableClientScript="true" ControlToValidate="txtpostComments" ErrorMessage="Please enter Post." runat="server"></asp:RequiredFieldValidator>

</td> 

</tr>
<tr>
<td width="16%">
</td>
<td>
<asp:FileUpload ID="uploadImg1" runat="server" />
<asp:FileUpload ID="uploadImg2" runat="server" />

</td>
</tr>
<tr>
<td width="16%">
<td align="right">
<asp:Button ID="btnpostCommentsShare" CssClass="sharebutton" Text="Share" runat="server" CommandArgument='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "p_id")) %>'
OnCommand="btnPostCommentsShare_Click" />

</td>
</tr>

In Web.config file :

The Below line i removed from web.config from httpHandlers section, then FileUpload Control is Returning File Name.

If i placed again it not returning file name.

Is this is Correct way to remove that from web.config file ,can you please help me.

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


 <!--<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>-->

<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</httpHandlers>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>