This is a migrated thread and some comments may be shown as answers.

Upload works first time, then it quits

1 Answer 69 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
William Martinez
Top achievements
Rank 1
William Martinez asked on 10 Feb 2010, 10:18 PM
I have a RadUpload control on my page. It works fine the first time I try to upload a file. The Control is placed in a MultiView, after I upload a document the view changes to show a gridview with the new file information. When I navigate back to the UpLoad View o it, it will not not browse for another file, the textbox is empty and and a black dot ? appears to the left of the control. I have the ControlObject Visibility set to "None". I have tried with and without the RadProgress and RadProgressManager Controls.  I am using VS2008 asp.net 3.5.


<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Theme="Theme1" Inherits="DocumentLibrary._Default" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

 

 

<%

@ Register src="Controls/DocDetail.ascx" tagname="DocDetail" tagprefix="uc1" %>

 

 

 

<

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

 

<style type="text/css">

 

 

.style2

 

{

 

width: 242px;

 

}

 

.style3

 

{

 

height: 32px;

 

}

 

</style>

 

 

 

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"

 

 

EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

<asp:UpdatePanel ID="UP1" runat="server">

 

 

<Triggers>

 

 

<asp:PostBackTrigger ControlID="btnUpload" />

 

 

</Triggers>

 

 

<ContentTemplate>

 

 

<table valign="top" width="600px">

 

 

<tr>

 

 

<td width="300" valign="top">

 

 

<asp:Repeater id="FormTypes" OnItemCommand="FormTypesCommand" runat="server">

 

 

<HeaderTemplate>

 

 

<table border="0" width="100%">

 

 

<tr>

 

 

</tr>

 

 

</HeaderTemplate>

 

 

<ItemTemplate >

 

 

<tr>

 

 

<td valign="top">

 

 

<asp:LinkButton ID="Button1" width="200px" f

 

 

CommandArgument=<%#DataBinder.Eval(Container.DataItem,"autoID")%>

 

 

Text=<%#DataBinder.Eval(Container.DataItem,"FormType")%> runat="server" Font-Size="12px" Font-Names="arial"></asp:LinkButton>

 

 

</td>

 

 

</tr>

 

 

</ItemTemplate>

 

 

<FooterTemplate>

 

 

</table>

 

 

</FooterTemplate>

 

 

</asp:Repeater>

 

 

</td>

 

 

<td valign="top">

 

 

<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">

 

 

<asp:View ID="View1" runat="server">

 

 

<table>

 

 

<tr>

 

 

<td width="300px">

 

 

<asp:Label ID="lblFormType" runat="server" />

 

 

</td>

 

 

<td width="300px" align="right">

 

 

<asp:button ID="btnadd" Text="Add a new document" runat="server"

 

 

onclick="btnadd_Click" /><br />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<asp:GridView ID="FileList" runat="server" AutoGenerateColumns="false"

 

 

onrowcommand="FileList_RowCommand" onrowcreated="FileList_RowCreated"

 

 

onselectedindexchanged="FileList_SelectedIndexChanged" GridLines="Horizontal" Width="600px">

 

 

<HeaderStyle Font-Bold="true" Font-Names="Calibri" />

 

 

<RowStyle Font-Names="arial" Font-Size="12px" />

 

 

<Columns>

 

<%

--0--%>

 

 

<asp:buttonfield buttontype="Link" commandname="view" text="vw" />

 

<%

--1--%>

 

 

<asp:boundfield datafield="formType" headertext="Form Type" visible="true" />

 

<%

--2--%>

 

 

<asp:TemplateField HeaderText="">

 

 

<ItemTemplate>

 

 

<a id="download" href='<%#ConfigurationManager.AppSettings.Get("HTTPwebroot")%>providerForms/<%#DataBinder.Eval(Container.DataItem,"formFolder")%>/<%#DataBinder.Eval(Container.DataItem,"fileName")%>'

 

 

target="_blank"><%#DataBinder.Eval(Container.DataItem, "original_fileName")%></a>

 

 

</ItemTemplate>

 

 

</asp:TemplateField>

 

<%

--3--%>

 

 

<asp:boundfield datafield="createDate" headertext="Created On" />

 

<%

--4--%>

 

 

<asp:boundfield datafield="fileName" headertext="Saved File Name"

 

 

visible="true" />

 

<%

--5--%>

 

 

<asp:boundfield datafield="formFolder" headertext="Folder" visible="true" />

 

<%

--6--%>

 

 

<asp:TemplateField HeaderText="">

 

 

<ItemTemplate>

 

 

<a id="download" href='<%#ConfigurationManager.AppSettings.Get("HTTPwebroot")%>providerForms/<%#DataBinder.Eval(Container.DataItem,"formFolder")%>/<%#DataBinder.Eval(Container.DataItem,"fileName")%>'

 

 

target="_blank">DL</a>

 

 

</ItemTemplate>

 

 

</asp:TemplateField>

 

<%

--7--%>

 

 

<asp:buttonfield buttontype="Link" commandname="rev" text="Rev" />

 

<%

--8--%>

 

 

<asp:buttonfield buttontype="Link" visible="false" commandname="delete" text="Del" />

 

<%

--9--%>

 

 

<asp:boundfield datafield="autoID" headertext="autoid" />

 

<%

--10--%>

 

 

<asp:buttonfield buttontype="Link" visible="false" commandname="edit" text="Edit" />

 

 

<asp:boundfield datafield="original_fileName" headertext="Folder" visible="true" />

 

 

</Columns>

 

 

</asp:GridView>

 

 

<br /><br />

 

 

 

<br />

 

 

<uc1:DocDetail id="DocDetail2" runat="server" />

 

 

</asp:View>

 

 

<asp:View ID="View2" runat="server">

 

 

<asp:Label ID="lblFormTypeRev" Font-Color="#A2CDEF" runat="server" Font-Names="Calibri" />

 

 

<asp:GridView ID="FileRevisions" runat="server" AutoGenerateColumns="false"

 

 

OnRowCommand="FileRevisions_RowCommand" onrowcreated="FileRevisions_RowCreated"

 

 

onrowdeleting="FileRevisions_RowDeleting"

 

 

onselectedindexchanged="FileRevisions_SelectedIndexChanged" Width="600px"

 

 

Font-Names="Calibri" Font-Color="#A2CDEF" GridLines="Horizontal">

 

 

<HeaderStyle Font-Bold="true" Font-Names="Calibri" />

 

 

<RowStyle Font-Names="arial" Font-Size="12px" />

 

 

<Columns>

 

<%

--0--%>

 

 

<asp:buttonfield buttontype="Link" commandname="view" text="vw" />

 

<%

--1--%>

 

 

<asp:boundfield datafield="formType" headertext="Form Type" Visible="true" />

 

<%

--2--%>

 

 

<asp:TemplateField HeaderText="">

 

 

<ItemTemplate>

 

 

<a id="download" href='<%#ConfigurationManager.AppSettings.Get("HTTPwebroot")%>providerForms/<%#DataBinder.Eval(Container.DataItem,"formFolder")%>/<%#DataBinder.Eval(Container.DataItem,"fileName")%>'

 

 

target="_blank"><%#DataBinder.Eval(Container.DataItem, "original_fileName")%></a>

 

 

</ItemTemplate>

 

 

</asp:TemplateField>

 

<%

--3--%>

 

 

<asp:boundfield datafield="createDate" headertext="Created On" />

 

<%

--4--%>

 

 

<asp:boundfield datafield="fileName" headertext="Saved File Name"

 

 

visible="true" />

 

<%

--5--%>

 

 

<asp:boundfield datafield="formFolder" headertext="Folder" visible="true" />

 

<%

--6--%>

 

 

<asp:TemplateField HeaderText="">

 

 

<ItemTemplate>

 

 

<a href='<%#ConfigurationManager.AppSettings.Get("HTTPwebroot")%>providerForms/<%#DataBinder.Eval(Container.DataItem,"formFolder")%>/<%#DataBinder.Eval(Container.DataItem,"fileName")%>'

 

 

target="_blank">DL</a><%--5--%>

 

 

</ItemTemplate>

 

 

</asp:TemplateField>

 

<%

--7--%>

 

 

<asp:buttonfield buttontype="Link" commandname="delete" text="Del" />

 

<%

--8--%>

 

 

<asp:boundfield datafield="autoID" headertext="autoid" />

 

<%

--9--%>

 

 

<asp:boundfield datafield="original_fileName" headertext="FileName" />

 

 

</Columns>

 

 

</asp:GridView>

 

 

<br /><br />

 

 

 

<br />

 

 

<uc1:DocDetail id="DocDetail1" runat="server" />

 

 

 

</asp:View>

 

 

<asp:View ID="View3" runat="server">

 

 

<asp:Image ID="Image1" runat="server" Width="71px" />

 

 

<asp:Literal ID="lit_Name" runat="server" /> This is View3.

 

 

</asp:View>

 

 

<asp:View ID="View4" runat="server">

 

 

<table cellpadding="2px" cellspacing="2px" width="100%">

 

 

<tr>

 

 

<td align="left" colspan="2" class="style3">

 

Form Type

<asp:DropDownList ID="ddlFormType" AutoPostBack="true" runat="server" Height="24px" Width="200px"

 

 

DataTextField="formType" DataValueField="autoid"

 

 

onselectedindexchanged="ddlFormType_SelectedIndexChanged" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

<asp:Label ID="lblFormID" runat="server" Width="397px" /><br />

 

 

<asp:DropDownList ID="ddlFormID" visible="false" runat="server" Height="24px"

 

 

Width="400px" onselectedindexchanged="ddlFormID_SelectedIndexChanged" />

 

 

<asp:TextBox ID="txtDescription" visible="false" runat="server" Width="400px" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="right" class="style2" >

 

 

<telerik:RadUpload ID="RadUpload1" Runat="server"

 

 

ControlObjectsVisibility="None" Height="29px" Width="300px"

 

 

oninit="Page_Load"></telerik:RadUpload>

 

<%

-- <telerik:RadProgressArea ID="RadProgressArea1" Runat="server" Language="">

 

<Localization Uploaded="Uploaded" />

</telerik:RadProgressArea>

<telerik:RadProgressManager ID="RadProgressManager2" Runat="server"

SuppressMissingHttpModuleError="True" />

--

 

%> <td align="left">

 

 

<asp:Button ID="btnUpload" runat="server" Text="Upload"

 

 

style="width: 60px" onclick="btnUpload_Click" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="left" colspan="2">

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

</asp:View>

 

 

<asp:View ID="View5" runat="server">

 

 

</asp:View>

 

 

</asp:MultiView>

 

 

<br /><br />

 

 

 <asp:Label ID="lblErrMsg" runat="server"></asp:Label>

 

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

1 Answer, 1 is accepted

Sort by
0
Vesko
Top achievements
Rank 2
answered on 16 Feb 2010, 07:53 AM
Please use the code viewer next time so we can see your code clearly.

I am only guessing but I suppose that you are making ajax calls when you change the views and the skin's CSS file is not registered. You can try setting EnableAjaxSkinRendering to True when you navigate back and forth.
Tags
Upload (Obsolete)
Asked by
William Martinez
Top achievements
Rank 1
Answers by
Vesko
Top achievements
Rank 2
Share this question
or