I have added a REV to an input type of file. I want to make sure that the
only file type that is allowed is a .gif, .jpg, or .jpeg. I develop my site
on my laptop which is running Win XP Pro and my site is hosted on a Win 2000
Advanced server. Here is my problem. When I test it on my local host of
the XP Pro machine the validator works. When I migrate it to the W2K box it
doesn't work. There is no error that is displayed. Is anyone aware of
this. Not sure if it makes a difference or not but the code is in a control
that is displayed.
Here is the code
<%@ import Namespace="ASPN ET.StarterKit.C ommunities" %>
<%@ Register TagPrefix="comm unity" Namespace="ASPN ET.StarterKit.C ommunities"
Assembly="ASPNE T.StarterKit.Co mmunities" %>
<%@ Control %>
<%--
This skin is used both for adding and editing a photo. Modify the HTML
content
to modify the appearance of the page.
--%>
<community:Sect ionTitle CssClass="Form_ Title" Runat="server"
id="SectionTitl e1" />
<p class="Form_Des cription">Use this form to upload images to the portal.
You can
rename files before uploading them.</p>
<p>
<community:Disp layQuota runat="server" id="DisplayQuot a1" />
</p>
<TABLE id="Table2" cellSpacing="0" cellPadding="3" class="Form_Tab le"
border="0">
<TR>
<TD class="Form_Sec tionRow">
Add Photo Form
<DIV></DIV>
</TD>
</TR>
<TR class="Form_Lab elRow">
<TD class="Form_Lab elText">
<div>
<span class="Form_Lab elText">Image File </span>
<community:Uplo adValidator id="valUpload"
ControlToValida te="txtPhotoFil e" Text="(required )" Runat="Server" />
<br>
<span class="Form_Hel pText">(For example, C:\Images\Book. jpg)</span>
</div>
<input id="txtPhotoFil e" type="file" Size="40" Runat="Server"> <br>
<asp:RegularExp ressionValidato r ControlToValida te="txtPhotoFil e"
ID="revTxtPhoto File" Runat="server" ErrorMessage="I mage must be a gif or
jpg/jpeg format."
ValidationExpre ssion="(.*\.([gG][iI][fF]|[jJ][pP][gG]|[jJ][pP][eE][gG])$)"><
/asp:RegularExpr essionValidator >
<br>
<community:Disp layPhotoImage id="imgPhoto" Width="100" Runat="Server" />
</TD>
</TR>
<tr>
<td class="Form_Lab elText">
<asp:Panel id="pnlTopics" runat="Server">
<SPAN class="Form_Lab elText">Topic</SPAN>
<asp:RequiredFi eldValidator id="RequiredFie ldValidator1" Runat="server"
CssClass="Form_ Field" Text="(required )"
ControlToValida te="dropTopics "
InitialValue="-1"></asp:RequiredFie ldValidator>
<BR>
<community:Topi cPicker id="dropTopics "
runat="Server"> </community:Topic Picker>
</asp:Panel>
</td>
</tr>
<TR>
<TD class="Form_Lab elText">
<div>
<span class="Form_Lab elText">Name </span>
<br>
<span class="Form_Hel pText">(For example, 'Summer Trip')</span>
<asp:RequiredFi eldValidator ControlToValida te="txtPhotoTit le"
Text="(required )" CssClass="Form_ Field" Runat="server"
id="RequiredFie ldValidator2" />
</div>
<asp:TextBox id="txtPhotoTit le" CssClass="Form_ Field" Columns="40"
runat="server"> </asp:TextBox>
<P></P>
</TD>
</TR>
<TR>
<TD class="Form_Lab elText" colSpan="2">
<div>
<span class="Form_Lab elText">Caption </span>
<br>
<span class="Form_Hel pText">(This information is listed on the Pictures
page.)</span>
<asp:RequiredFi eldValidator ControlToValida te="txtPhotoBri efDescription"
Text="(required )" Display="Dynami c"
CssClass="Form_ Field" Runat="server" id="RequiredFie ldValidator3" />
<community:Leng thValidator Maxlength="500"
ControlToValida te="txtPhotoBri efDescription" Text="(less than 500
characters)"
CssClass="Form_ Field" Runat="server" id="LengthValid ator1" />
</div>
<asp:TextBox id="txtPhotoBri efDescription" CssClass="Form_ Field"
runat="server" TextMode="Multi Line"
Rows="5" Width="508px"></asp:TextBox>
<P></P>
</TD>
</TR>
<TR>
<TD class="Form_Lab elText" colSpan="2">
<div>
<span class="Form_Lab elText">Full Description</span>
<br>
<span class="Form_Hel pText">(Optiona l. Users can access this information
when they press the 'Read More' link.)</span>
</div>
<community:Html TextBox id="txtPhotoFul lDescription" runat="server"
Rows="5" Width="508px" />
</TD>
</TR>
<TR>
<TD align="right" colSpan="2" class="Form_Sec tionRow">
<asp:Button id="btnAdd" CssClass="Form_ Button" Runat="server" Text="Add
New Image"></asp:Button>
<asp:Button id="btnEdit" CssClass="Form_ Button" Runat="server"
Text="Apply Changes"></asp:Button>
</TD>
</TR>
</TABLE>
<p>
</p>