Saturday, March 31, 2012
The asp Tags dosn't appear
I'm using the ASP.net 2.0 Beta 1, and in the html section of my page the
asp tags dosn't appear, and i get a warning if i wrote them.
Any helpCan you provide the error?
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi all,
> I'm using the ASP.net 2.0 Beta 1, and in the html section of my page
> the
> asp tags dosn't appear, and i get a warning if i wrote them.
> Any help
The error i get is : asp is unrecognized tag prefix or device filter
Thanks for your reply and time
"Brock Allen" wrote:
> Can you provide the error?
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>
> The error i get is : asp is unrecognized tag prefix or device filter
Hmm, this is very strange. I don't think I've ever come across this problem.
It makes me feel like somehow some core configuration setting in ASP.NET
is messed up. Can you create a new project in VS.NET and make it work there?
Also, are you using a master page? If you are, then the root element you
need is a <asp:Content> elemenet.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks for your reply, but the idea is i'm not using the master pages, becus
e
it is not working on my laptob, and the project is new one!!!!!!
"Brock Allen" wrote:
> Hmm, this is very strange. I don't think I've ever come across this proble
m.
> It makes me feel like somehow some core configuration setting in ASP.NET
> is messed up. Can you create a new project in VS.NET and make it work ther
e?
> Also, are you using a master page? If you are, then the root element you
> need is a <asp:Content> elemenet.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
The asp Tags dosnt appear
I'm using the ASP.net 2.0 Beta 1, and in the html section of my page the
asp tags dosn't appear, and i get a warning if i wrote them.
Any helpCan you provide the error?
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi all,
> I'm using the ASP.net 2.0 Beta 1, and in the html section of my page
> the
> asp tags dosn't appear, and i get a warning if i wrote them.
> Any help
The error i get is : asp is unrecognized tag prefix or device filter
Thanks for your reply and time
"Brock Allen" wrote:
> Can you provide the error?
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
> > Hi all,
> > I'm using the ASP.net 2.0 Beta 1, and in the html section of my page
> > the
> > asp tags dosn't appear, and i get a warning if i wrote them.
> > Any help
>
>
> The error i get is : asp is unrecognized tag prefix or device filter
Hmm, this is very strange. I don't think I've ever come across this problem.
It makes me feel like somehow some core configuration setting in ASP.NET
is messed up. Can you create a new project in VS.NET and make it work there?
Also, are you using a master page? If you are, then the root element you
need is a <asp:Content> elemenet.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks for your reply, but the idea is i'm not using the master pages, becuse
it is not working on my laptob, and the project is new one!!!!!!
"Brock Allen" wrote:
> > The error i get is : asp is unrecognized tag prefix or device filter
> Hmm, this is very strange. I don't think I've ever come across this problem.
> It makes me feel like somehow some core configuration setting in ASP.NET
> is messed up. Can you create a new project in VS.NET and make it work there?
> Also, are you using a master page? If you are, then the root element you
> need is a <asp:Content> elemenet.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
Wednesday, March 28, 2012
The best way to parse an html file?
I have a html file file that I want to parse with ASP.NET to retreive the
value of a custom tag. Let's say that the average html file is about 30 ko.
Once the html file is loaded and converted into a single string, I'm using
for now is two string.indexOf to find the begin and the end of the desired
tag and then a string.substring to extract the data. I'm not using regular
expressions since I know exactly what are the tags to find.
My function goes like this:
private string ParseHtml(string html)
{
html = html.Replace("\r\n","");
int begin = html.IndexOf("%%StartGetHtml%%");
int end = html.IndexOf("%%EndGetHtml%%",begin);
int begin2, end2;
string str = null;
if (begin > 0 && end > 0)
{
// Gets the beginning of the tag
begin2 = html.IndexOf("<",begin);
// Gets the end of the tag
end2 = html.IndexOf(">",end-3);
if (begin2 < end2 && end2 < end)
{
// Gets the tag
str = html.Substring(begin2,end-begin2);
}
}
return str;
}
Is this the fastest way or there could be a better way to do this?
Thanks
Stephane
Stephane wrote:
> I have a html file file that I want to parse with ASP.NET to retreive the
> value of a custom tag. Let's say that the average html file is about 30 ko
.
> Once the html file is loaded and converted into a single string, I'm using
> for now is two string.indexOf to find the begin and the end of the desired
> tag and then a string.substring to extract the data. I'm not using regular
> expressions since I know exactly what are the tags to find.
> My function goes like this:
> private string ParseHtml(string html)
> {
> html = html.Replace("\r\n","");
> int begin = html.IndexOf("%%StartGetHtml%%");
> int end = html.IndexOf("%%EndGetHtml%%",begin);
> int begin2, end2;
> string str = null;
> if (begin > 0 && end > 0)
> {
> // Gets the beginning of the tag
> begin2 = html.IndexOf("<",begin);
> // Gets the end of the tag
> end2 = html.IndexOf(">",end-3);
> if (begin2 < end2 && end2 < end)
> {
> // Gets the tag
> str = html.Substring(begin2,end-begin2);
> }
> }
> return str;
> }
> Is this the fastest way or there could be a better way to do this?
If those string processing attempts suffice for you then use them but in
general if you want to parse HTML you might want to check SGMLReader, see
http://www.gotdotnet.com/community/...uery=sgmlreader
Martin Honnen
http://JavaScript.FAQTs.com/
The best way to parse an html file?
I have a html file file that I want to parse with ASP.NET to retreive the
value of a custom tag. Let's say that the average html file is about 30 ko.
Once the html file is loaded and converted into a single string, I'm using
for now is two string.indexOf to find the begin and the end of the desired
tag and then a string.substring to extract the data. I'm not using regular
expressions since I know exactly what are the tags to find.
My function goes like this:
private string ParseHtml(string html)
{
html = html.Replace("\r\n","");
int begin = html.IndexOf("%%StartGetHtml%%");
int end = html.IndexOf("%%EndGetHtml%%",begin);
int begin2, end2;
string str = null;
if (begin > 0 && end > 0)
{
// Gets the beginning of the tag
begin2 = html.IndexOf("<",begin);
// Gets the end of the tag
end2 = html.IndexOf(">",end-3);
if (begin2 < end2 && end2 < end)
{
// Gets the tag
str = html.Substring(begin2,end-begin2);
}
}
return str;
}
Is this the fastest way or there could be a better way to do this?
Thanks
Stephane
Stephane wrote:
> I have a html file file that I want to parse with ASP.NET to retreive the
> value of a custom tag. Let's say that the average html file is about 30 ko.
> Once the html file is loaded and converted into a single string, I'm using
> for now is two string.indexOf to find the begin and the end of the desired
> tag and then a string.substring to extract the data. I'm not using regular
> expressions since I know exactly what are the tags to find.
> My function goes like this:
> private string ParseHtml(string html)
> {
> html = html.Replace("\r\n","");
> int begin = html.IndexOf("%%StartGetHtml%%");
> int end = html.IndexOf("%%EndGetHtml%%",begin);
> int begin2, end2;
> string str = null;
> if (begin > 0 && end > 0)
> {
> // Gets the beginning of the tag
> begin2 = html.IndexOf("<",begin);
> // Gets the end of the tag
> end2 = html.IndexOf(">",end-3);
> if (begin2 < end2 && end2 < end)
> {
> // Gets the tag
> str = html.Substring(begin2,end-begin2);
> }
> }
> return str;
> }
> Is this the fastest way or there could be a better way to do this?
If those string processing attempts suffice for you then use them but in
general if you want to parse HTML you might want to check SGMLReader, see
http://www.gotdotnet.com/community/...uery=sgmlreader
--
Martin Honnen
http://JavaScript.FAQTs.com/
Saturday, March 24, 2012
The default page is only showing HTML when copied to Host.
Hi Guys,
I'm working on a little site for a friend (my first!) I've been viewing in browser and everything is going fine, but when I copy the site to the hoster for further development all I'm seeing is html. I'm usingwww.streamline.com as the host, I have all the settings correct (I think), and I have set the webconfig file debug to false.
So, what am I doing wrong.
below is the code from the masterpage. (yes, I'm sure it's messy, but I haven't done the css yet).
<%@dotnet.itags.org. Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body bgcolor="#bdd8ea"> <form id="form1" runat="server"> <div> <table border="0" cellpadding="0" cellspacing="0" style="z-index: 100; left: 60px; width: 850px; position: absolute; top: 13px; height: 370px;"> <tr> <td align="left" style="background-color: #ffffff; width: 850px; height: 3px;" valign="top"> <p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center"> <span style="font-size: 24pt; color: #3300ff; font-family: Arial;"></span> </p> <p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center"> </p> <p align="center" class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: center"> </p> </td> </tr> <tr> <td align="left" style="background-color: #ffffff; width: 850px; height: 31px;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="z-index: 100; left: 1px; width: 99.5%; position: absolute; top: 137px"> <tr> <td align="left" style="width: 109px; background-color: #099ccf; height: 30px;" valign="bottom"> </td> <td align="left" style="background-color: #099ccf; height: 30px; font-weight: bold; font-size: 15pt; color: #ffffff; font-family: 'Microsoft Sans Serif'; vertical-align: middle; width: 554px; text-align: left;" valign="bottom"> <asp:Literal ID="Literal1" runat="server"></asp:Literal></td> <td align="left" style="background-color: #099ccf; height: 30px;" valign="bottom"> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="z-index: 101; left: 0px; width: 100%; position: absolute; top: 168px; border-left-width: thin; border-left-color: #ffffff;"> <tr> <td align="left" style="border-top: #099ccf 2px solid; width: 3px; height: 288px; background-color: #ffffff" valign="top"> </td> <td align="left" style="border-top: #099ccf 2px solid; width: 122px; height: 288px; background-color: #ffffff; text-align: right;" valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="z-index: 100; left: 3px; width: 100%; position: absolute; top: 5px; height: 189px;"> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="default.aspx" onmouseover="document.images.pic1.src='Images/Home_Over.gif'" onmouseout="document.images.pic1.src='Images/Home_Out.gif'"> <img src="Images/Home_Out.gif" name="pic1" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="Services.aspx" onmouseover="document.images.pic2.src='Images/Services_Over.gif'" onmouseout="document.images.pic2.src='Images/Services_Out.gif'"> <img src="Images/Services_Out.gif" name="pic2" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="CurrentProjects.aspx" onmouseover="document.images.pic3.src='Images/CurrentProjects_Over.gif'" onmouseout="document.images.pic3.src='Images/CurrentProjects_Out.gif'"> <img src="Images/CurrentProjects_Out.gif" name="pic3" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="FutureProjects.aspx" onmouseover="document.images.pic4.src='Images/FutureProjects_Over.gif'" onmouseout="document.images.pic4.src='Images/FutureProjects_Out.gif'"> <img src="Images/FutureProjects_Out.gif" name="pic4" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="Gallery.aspx" onmouseover="document.images.pic5.src='Images/Gallery_Over.gif'" onmouseout="document.images.pic5.src='Images/Gallery_Out.gif'"> <img src="Images/Gallery_Out.gif" name="pic5" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="Testimonials.aspx" onmouseover="document.images.pic6.src='Images/Testimonials_Over.gif'" onmouseout="document.images.pic6.src='Images/Testimonials_Out.gif'"> <img src="Images/Testimonials_Out.gif" name="pic6" border="0"></a> </td> </tr> <tr> <td align="center" style="border-bottom: #ffffff 2px solid; background-color: #ffffff" valign="middle"> <a href="UsefulLinks.aspx" onmouseover="document.images.pic7.src='Images/UsefulLinks_Over.gif'" onmouseout="document.images.pic7.src='Images/UsefulLinks_Out.gif'"> <img src="Images/UsefulLinks_Out.gif" name="pic7" border="0"></a> </td> </tr> <tr> <td align="center" style="background-color: #ffffff" valign="middle"> <a href="ContactUs.aspx" onmouseover="document.images.pic8.src='Images/ContactUs_Over.gif'" onmouseout="document.images.pic8.src='Images/ContactUs_Out.gif'"> <img src="Images/ContactUs_Out.gif" name="pic8" border="0"></a> </td> </tr> </table> </td> <td align="left" style="width: 10px; height: 288px; background-color: #ffffff; border-top: #099ccf 2px solid; border-left: #099ccf 1px solid;" valign="top"> </td> <td align="left" style="width: 473px; height: 288px; background-color: #ffffff; border-top: #099ccf 2px solid; font-size: 10pt; color: buttonshadow; font-family: 'Microsoft Sans Serif';" valign="top"> <br /> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </td> <td align="left" style="width: 10px; height: 288px; background-color: #ffffff; border-right: #099ccf 2px solid; border-top: #099ccf 2px solid;" valign="top"> </td> <td align="left" style="width: 155px; height: 288px; background-color: #ffffff" valign="top"> </td> </tr> <tr> <td align="left" style="width: 3px; height: 20px; background-color: #ffffff; border-top-width: 2px; border-top-color: #099ccf;" valign="top"> </td> <td align="left" style="width: 122px; height: 20px; background-color: #ffffff; text-align: right; border-top-width: 2px; border-top-color: #099ccf;" valign="top"> </td> <td align="left" style="width: 10px; height: 20px; background-color: #ffffff; border-top-width: 2px; border-top-color: #099ccf; border-left: #099ccf 1px solid;" valign="top"> </td> <td align="left" style="border-top-width: 2px; width: 473px; border-top-color: #099ccf; height: 20px; background-color: #ffffff" valign="top"> </td> <td align="left" style="border-right: #099ccf 2px solid; width: 10px; height: 20px; background-color: #ffffff; border-top-width: 2px; border-top-color: #099ccf;" valign="top"> </td> <td align="left" style="width: 155px; height: 20px; background-color: #ffffff" valign="top"> </td> </tr> <tr> <td align="left" height="3" style="width: 3px; background-color: #ffffff" valign="top"> </td> <td align="left" height="3" style="width: 122px; background-color: #ffffff" valign="top"> </td> <td align="left" height="3" style="width: 10px; background-color: #ffffff" valign="top"> </td> <td align="left" height="3" style="width: 473px; background-color: #ffffff" valign="top"> </td> <td align="left" height="3" style="width: 10px; background-color: #ffffff" valign="top"> </td> <td align="left" height="3" style="width: 155px; background-color: #ffffff" valign="top"> </td> </tr> <tr> <td align="left" style="width: 3px; background-color: #bdd8ea" valign="top"> </td> <td align="left" style="width: 122px; background-color: #bdd8ea" valign="top"> </td> <td align="left" style="width: 10px; background-color: #bdd8ea" valign="top"> </td> <td align="left" style="width: 473px; background-color: #bdd8ea; text-align: center;" valign="top"> <span style="color: dimgray"><span style="font-size: 8pt"><span style="font-family: Arial"><span style="color: dimgray; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-GB; mso-fareast-language: EN-GB; mso-bidi-language: AR-SA"><strong style="vertical-align: middle">? </strong></span>T and S Wilson 2007/2008</span></span></span></td> <td align="left" style="width: 10px; background-color: #bdd8ea" valign="top"> </td> <td align="left" style="width: 155px; background-color: #bdd8ea" valign="top"> </td> </tr> </table> </td> </tr> </table> </div> </form></body></html>
Most likely ASP.NET is not setup on the site. Check with the host to be sure the site is on an IIS server running the version of ASP.NET (2.0|3.5) that you have built the site with. Most likely they have not setup ASP.NET on the server.
Thanks. They only open 10am til 4pm gmt so I'll ask them tomorrow.
I don't think you host provides .Net, or if they do .. most probably not 2.0/3.5
Looks like Streamline is a merchant company, not a hosting company.
What is the difference, they offer hosting?
Yes, they charged me an extra 35 quid for the ASP.NET framework, still only 4.5 quid a month though, so not bad.
Ta!
Sorry for my ignorance, but what is a quid in relation to a pound? I know a pound is a little more than a US $ and a pence is similar to our penny.
'Quid' is slang for 1 pound sterling (roughly $2), and a penny is roughly 2 cents.
Everybody says quid, and it's easier on a computer in case the reader's browser doesn't support the Libre 'pound' symbol. For instance, in the british civil service, I believe it is common practice to use a small i instead of the pound symbol.
You learn something every day!
Cool! I was watching the office on BBC America last night and they were talking about Quid. The manager paid the secretary 100 quid to help him in a motivational speaking event.
the development environment is overzealously formatting my html when switching from design
I'm into writing perfectly indented html, but the .net dev environment is
being overzealous and messing up my html formatting.
for example, I originally write:
<table>
<tr>
<td>
<asp:label id="lblSuccess" runat="server">
</asp:/label>
</td>
</tr>
</table
then the dev environment switches it to something like:
<table>
<tr>
<td><asp:label id="lblSuccess" runat="server"></asp:/label>
</td></tr></table
I'm running the latest version of .net --version 7.1.3088
I've run through the tools/options and placed the envirionment to do the
least amount of microsoftesque-preemptive formatting.
Please HELP!!! If there is no solution I think I'm gonna code .net stuff in
notepad until I can get a linux, bsd or UNIX job...lol jk. I've been an MS
developer for years!it's a setting in the options of VS....
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> Please tell me there is a way to prevent this annoyance ; - )
> I'm into writing perfectly indented html, but the .net dev environment is
> being overzealous and messing up my html formatting.
> for example, I originally write:
> <table>
> <tr>
> <td>
> <asp:label id="lblSuccess" runat="server">
> </asp:/label>
> </td>
> </tr>
> </table>
> then the dev environment switches it to something like:
> <table>
> <tr>
> <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> </td></tr></table>
>
> I'm running the latest version of .net --version 7.1.3088
> I've run through the tools/options and placed the envirionment to do the
> least amount of microsoftesque-preemptive formatting.
> Please HELP!!! If there is no solution I think I'm gonna code .net stuff
in
> notepad until I can get a linux, bsd or UNIX job...lol jk. I've been an
MS
> developer for years!
which setting? I've tried them all!
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> it's a setting in the options of VS....
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > Please tell me there is a way to prevent this annoyance ; - )
> > I'm into writing perfectly indented html, but the .net dev environment
is
> > being overzealous and messing up my html formatting.
> > for example, I originally write:
> > <table>
> > <tr>
> > <td>
> > <asp:label id="lblSuccess" runat="server">
> > </asp:/label>
> > </td>
> > </tr>
> > </table>
> > then the dev environment switches it to something like:
> > <table>
> > <tr>
> > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > </td></tr></table>
> > I'm running the latest version of .net --version 7.1.3088
> > I've run through the tools/options and placed the envirionment to do the
> > least amount of microsoftesque-preemptive formatting.
> > Please HELP!!! If there is no solution I think I'm gonna code .net
stuff
> in
> > notepad until I can get a linux, bsd or UNIX job...lol jk. I've been an
> MS
> > developer for years!
Tools
Options
Text Editor
HTML/XML
Format
Try the settings there.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> which setting? I've tried them all!
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > it's a setting in the options of VS....
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > Site: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > Please tell me there is a way to prevent this annoyance ; - )
> > > > I'm into writing perfectly indented html, but the .net dev environment
> is
> > > being overzealous and messing up my html formatting.
> > > > for example, I originally write:
> > > > <table>
> > > <tr>
> > > <td>
> > > <asp:label id="lblSuccess" runat="server">
> > > </asp:/label>
> > > </td>
> > > </tr>
> > > </table>
> > > > then the dev environment switches it to something like:
> > > > <table>
> > > <tr>
> > > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > > </td></tr></table>
> > > > > I'm running the latest version of .net --version 7.1.3088
> > > I've run through the tools/options and placed the envirionment to do
the
> > > least amount of microsoftesque-preemptive formatting.
> > > > Please HELP!!! If there is no solution I think I'm gonna code .net
> stuff
> > in
> > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've been
an
> > MS
> > > developer for years!
> > >
You are wrong. You are just guessing. Its best not to answer questions
unless you have a specific and tested answer. Please excuse my bluntness.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> Tools
> Options
> Text Editor
> HTML/XML
> Format
> Try the settings there.
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > which setting? I've tried them all!
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > it's a setting in the options of VS....
> > > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > Site: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > I'm into writing perfectly indented html, but the .net dev
environment
> > is
> > > > being overzealous and messing up my html formatting.
> > > > > > for example, I originally write:
> > > > > > <table>
> > > > <tr>
> > > > <td>
> > > > <asp:label id="lblSuccess" runat="server">
> > > > </asp:/label>
> > > > </td>
> > > > </tr>
> > > > </table>
> > > > > > then the dev environment switches it to something like:
> > > > > > <table>
> > > > <tr>
> > > > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > > > </td></tr></table>
> > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > I've run through the tools/options and placed the envirionment to do
> the
> > > > least amount of microsoftesque-preemptive formatting.
> > > > > > Please HELP!!! If there is no solution I think I'm gonna code .net
> > stuff
> > > in
> > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
been
> an
> > > MS
> > > > developer for years!
> > > > > > > >
it's a setting in the options of VS....
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> Please tell me there is a way to prevent this annoyance ; - )
> I'm into writing perfectly indented html, but the .net dev environment is
> being overzealous and messing up my html formatting.
> for example, I originally write:
> <table>
> <tr>
> <td>
> <asp:label id="lblSuccess" runat="server">
> </asp:/label>
> </td>
> </tr>
> </table>
> then the dev environment switches it to something like:
> <table>
> <tr>
> <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> </td></tr></table>
>
> I'm running the latest version of .net --version 7.1.3088
> I've run through the tools/options and placed the envirionment to do the
> least amount of microsoftesque-preemptive formatting.
> Please HELP!!! If there is no solution I think I'm gonna code .net stuff
in
> notepad until I can get a linux, bsd or UNIX job...lol jk. I've been an
MS
> developer for years!
which setting? I've tried them all!
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> it's a setting in the options of VS....
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > Please tell me there is a way to prevent this annoyance ; - )
> > I'm into writing perfectly indented html, but the .net dev environment
is
> > being overzealous and messing up my html formatting.
> > for example, I originally write:
> > <table>
> > <tr>
> > <td>
> > <asp:label id="lblSuccess" runat="server">
> > </asp:/label>
> > </td>
> > </tr>
> > </table>
> > then the dev environment switches it to something like:
> > <table>
> > <tr>
> > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > </td></tr></table>
> > I'm running the latest version of .net --version 7.1.3088
> > I've run through the tools/options and placed the envirionment to do the
> > least amount of microsoftesque-preemptive formatting.
> > Please HELP!!! If there is no solution I think I'm gonna code .net
stuff
> in
> > notepad until I can get a linux, bsd or UNIX job...lol jk. I've been an
> MS
> > developer for years!
Yeah, whatever you say.
PLONK - Killfile
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:6IJxc.410$yR5.204@.fe25.usenetserver.com...
> You are wrong. You are just guessing. Its best not to answer questions
> unless you have a specific and tested answer. Please excuse my bluntness.
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> > Tools
> > Options
> > Text Editor
> > HTML/XML
> > Format
> > Try the settings there.
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > Site: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > > which setting? I've tried them all!
> > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > it's a setting in the options of VS....
> > > > > > --
> > > > Curt Christianson
> > > > Owner/Lead Developer, DF-Software
> > > > Site: http://www.Darkfalz.com
> > > > Blog: http://blog.Darkfalz.com
> > > > > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > > > I'm into writing perfectly indented html, but the .net dev
> environment
> > > is
> > > > > being overzealous and messing up my html formatting.
> > > > > > > > for example, I originally write:
> > > > > > > > <table>
> > > > > <tr>
> > > > > <td>
> > > > > <asp:label id="lblSuccess" runat="server">
> > > > > </asp:/label>
> > > > > </td>
> > > > > </tr>
> > > > > </table>
> > > > > > > > then the dev environment switches it to something like:
> > > > > > > > <table>
> > > > > <tr>
> > > > > <td><asp:label id="lblSuccess"
runat="server"></asp:/label>
> > > > > </td></tr></table>
> > > > > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > > I've run through the tools/options and placed the envirionment to
do
> > the
> > > > > least amount of microsoftesque-preemptive formatting.
> > > > > > > > Please HELP!!! If there is no solution I think I'm gonna code
..net
> > > stuff
> > > > in
> > > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
> been
> > an
> > > > MS
> > > > > developer for years!
> > > > > > > > > > > > > > > >
Tools
Options
Text Editor
HTML/XML
Format
Try the settings there.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> which setting? I've tried them all!
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > it's a setting in the options of VS....
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > Site: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > Please tell me there is a way to prevent this annoyance ; - )
> > > > I'm into writing perfectly indented html, but the .net dev environment
> is
> > > being overzealous and messing up my html formatting.
> > > > for example, I originally write:
> > > > <table>
> > > <tr>
> > > <td>
> > > <asp:label id="lblSuccess" runat="server">
> > > </asp:/label>
> > > </td>
> > > </tr>
> > > </table>
> > > > then the dev environment switches it to something like:
> > > > <table>
> > > <tr>
> > > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > > </td></tr></table>
> > > > > I'm running the latest version of .net --version 7.1.3088
> > > I've run through the tools/options and placed the envirionment to do
the
> > > least amount of microsoftesque-preemptive formatting.
> > > > Please HELP!!! If there is no solution I think I'm gonna code .net
> stuff
> > in
> > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've been
an
> > MS
> > > developer for years!
> > >
You are wrong. You are just guessing. Its best not to answer questions
unless you have a specific and tested answer. Please excuse my bluntness.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> Tools
> Options
> Text Editor
> HTML/XML
> Format
> Try the settings there.
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > which setting? I've tried them all!
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > it's a setting in the options of VS....
> > > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > Site: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > I'm into writing perfectly indented html, but the .net dev
environment
> > is
> > > > being overzealous and messing up my html formatting.
> > > > > > for example, I originally write:
> > > > > > <table>
> > > > <tr>
> > > > <td>
> > > > <asp:label id="lblSuccess" runat="server">
> > > > </asp:/label>
> > > > </td>
> > > > </tr>
> > > > </table>
> > > > > > then the dev environment switches it to something like:
> > > > > > <table>
> > > > <tr>
> > > > <td><asp:label id="lblSuccess" runat="server"></asp:/label>
> > > > </td></tr></table>
> > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > I've run through the tools/options and placed the envirionment to do
> the
> > > > least amount of microsoftesque-preemptive formatting.
> > > > > > Please HELP!!! If there is no solution I think I'm gonna code .net
> > stuff
> > > in
> > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
been
> an
> > > MS
> > > > developer for years!
> > > > > > > >
See the problem is that you acted like you know the answer, so now a
microsoft employee monitoring this board will assume that my question was
answered. At the bottom of my initial post I mentioned I had already run
through the tools /options. of VS and put them all on settings that do the
least amount of work.
Nothing against you personally, but please don't give unspecific answers
that don't work. That diminishes the quality of the board for the rest of
us. Also be sure to read the full thread before answering. If you'd have
done that in this case, you'd have known that even your third attempt to
answer was inadequate. Were you such a pain in the a## to your teachers when
you were in school--always wanting cheap credit for rushing to give the
obvious answer that all the other students knew, but not exactly what the
teacher asked for?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eZMpnCmTEHA.3420@.TK2MSFTNGP12.phx.gbl...
> Yeah, whatever you say.
> PLONK - Killfile
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:6IJxc.410$yR5.204@.fe25.usenetserver.com...
> > You are wrong. You are just guessing. Its best not to answer questions
> > unless you have a specific and tested answer. Please excuse my
bluntness.
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> > > Tools
> > > Options
> > > Text Editor
> > > HTML/XML
> > > Format
> > > > Try the settings there.
> > > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > Site: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > > > which setting? I've tried them all!
> > > > > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > > > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > > it's a setting in the options of VS....
> > > > > > > > --
> > > > > Curt Christianson
> > > > > Owner/Lead Developer, DF-Software
> > > > > Site: http://www.Darkfalz.com
> > > > > Blog: http://blog.Darkfalz.com
> > > > > > > > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > > > > > I'm into writing perfectly indented html, but the .net dev
> > environment
> > > > is
> > > > > > being overzealous and messing up my html formatting.
> > > > > > > > > > for example, I originally write:
> > > > > > > > > > <table>
> > > > > > <tr>
> > > > > > <td>
> > > > > > <asp:label id="lblSuccess" runat="server">
> > > > > > </asp:/label>
> > > > > > </td>
> > > > > > </tr>
> > > > > > </table>
> > > > > > > > > > then the dev environment switches it to something like:
> > > > > > > > > > <table>
> > > > > > <tr>
> > > > > > <td><asp:label id="lblSuccess"
> runat="server"></asp:/label>
> > > > > > </td></tr></table>
> > > > > > > > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > > > I've run through the tools/options and placed the envirionment
to
> do
> > > the
> > > > > > least amount of microsoftesque-preemptive formatting.
> > > > > > > > > > Please HELP!!! If there is no solution I think I'm gonna code
> .net
> > > > stuff
> > > > > in
> > > > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
> > been
> > > an
> > > > > MS
> > > > > > developer for years!
> > > > > > > > > > > > > > > > > > > > > > > > > >
Yeah, whatever you say.
PLONK - Killfile
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
news:6IJxc.410$yR5.204@.fe25.usenetserver.com...
> You are wrong. You are just guessing. Its best not to answer questions
> unless you have a specific and tested answer. Please excuse my bluntness.
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> > Tools
> > Options
> > Text Editor
> > HTML/XML
> > Format
> > Try the settings there.
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > Site: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > > which setting? I've tried them all!
> > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > it's a setting in the options of VS....
> > > > > > --
> > > > Curt Christianson
> > > > Owner/Lead Developer, DF-Software
> > > > Site: http://www.Darkfalz.com
> > > > Blog: http://blog.Darkfalz.com
> > > > > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > > > I'm into writing perfectly indented html, but the .net dev
> environment
> > > is
> > > > > being overzealous and messing up my html formatting.
> > > > > > > > for example, I originally write:
> > > > > > > > <table>
> > > > > <tr>
> > > > > <td>
> > > > > <asp:label id="lblSuccess" runat="server">
> > > > > </asp:/label>
> > > > > </td>
> > > > > </tr>
> > > > > </table>
> > > > > > > > then the dev environment switches it to something like:
> > > > > > > > <table>
> > > > > <tr>
> > > > > <td><asp:label id="lblSuccess"
runat="server"></asp:/label>
> > > > > </td></tr></table>
> > > > > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > > I've run through the tools/options and placed the envirionment to
do
> > the
> > > > > least amount of microsoftesque-preemptive formatting.
> > > > > > > > Please HELP!!! If there is no solution I think I'm gonna code
..net
> > > stuff
> > > > in
> > > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
> been
> > an
> > > > MS
> > > > > developer for years!
> > > > > > > > > > > > > > > >
See the problem is that you acted like you know the answer, so now a
microsoft employee monitoring this board will assume that my question was
answered. At the bottom of my initial post I mentioned I had already run
through the tools /options. of VS and put them all on settings that do the
least amount of work.
Nothing against you personally, but please don't give unspecific answers
that don't work. That diminishes the quality of the board for the rest of
us. Also be sure to read the full thread before answering. If you'd have
done that in this case, you'd have known that even your third attempt to
answer was inadequate. Were you such a pain in the a## to your teachers when
you were in school--always wanting cheap credit for rushing to give the
obvious answer that all the other students knew, but not exactly what the
teacher asked for?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eZMpnCmTEHA.3420@.TK2MSFTNGP12.phx.gbl...
> Yeah, whatever you say.
> PLONK - Killfile
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> news:6IJxc.410$yR5.204@.fe25.usenetserver.com...
> > You are wrong. You are just guessing. Its best not to answer questions
> > unless you have a specific and tested answer. Please excuse my
bluntness.
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:%23pDqTglTEHA.3988@.tk2msftngp13.phx.gbl...
> > > Tools
> > > Options
> > > Text Editor
> > > HTML/XML
> > > Format
> > > > Try the settings there.
> > > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > Site: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > news:_7Jxc.408$yR5.196@.fe25.usenetserver.com...
> > > > which setting? I've tried them all!
> > > > > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > > > news:erCz9AlTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > > it's a setting in the options of VS....
> > > > > > > > --
> > > > > Curt Christianson
> > > > > Owner/Lead Developer, DF-Software
> > > > > Site: http://www.Darkfalz.com
> > > > > Blog: http://blog.Darkfalz.com
> > > > > > > > > > > "Jacob Crossley" <jacobcrossley@.hotmail.com> wrote in message
> > > > > news:dTHxc.405$yR5.148@.fe25.usenetserver.com...
> > > > > > Please tell me there is a way to prevent this annoyance ; - )
> > > > > > > > > > I'm into writing perfectly indented html, but the .net dev
> > environment
> > > > is
> > > > > > being overzealous and messing up my html formatting.
> > > > > > > > > > for example, I originally write:
> > > > > > > > > > <table>
> > > > > > <tr>
> > > > > > <td>
> > > > > > <asp:label id="lblSuccess" runat="server">
> > > > > > </asp:/label>
> > > > > > </td>
> > > > > > </tr>
> > > > > > </table>
> > > > > > > > > > then the dev environment switches it to something like:
> > > > > > > > > > <table>
> > > > > > <tr>
> > > > > > <td><asp:label id="lblSuccess"
> runat="server"></asp:/label>
> > > > > > </td></tr></table>
> > > > > > > > > > > > > > I'm running the latest version of .net --version 7.1.3088
> > > > > > I've run through the tools/options and placed the envirionment
to
> do
> > > the
> > > > > > least amount of microsoftesque-preemptive formatting.
> > > > > > > > > > Please HELP!!! If there is no solution I think I'm gonna code
> .net
> > > > stuff
> > > > > in
> > > > > > notepad until I can get a linux, bsd or UNIX job...lol jk. I've
> > been
> > > an
> > > > > MS
> > > > > > developer for years!
> > > > > > > > > > > > > > > > > > > > > > > > > >
The element html occurs too few times.
It says "The element 'html' occurs too few times."
Is there anyway to turn off this error to get it to compile?
Richard
"Surely there are other reasons you would want to have an aspx page without an <html> tag in it"
Like when? an aspx page is goign to spit out an HTML document, so the <html> tag makes perfect sense
Sounds like you have your programming all backwards, the aspx page should have the shell and the user controls should have the dynamic content, not the other way around
Like for example when you are trying to output WAP content for one, or plain text for another.
This is because I need to be able to easily substitute the head sections primarily dynamically, this enables multiple sites to run on the same codebase looking for Host headers to load the appropriate templates, it also allows easy support for text only versions of sites, just by dynamically loading text only versions of the user controls, this is for a database driven website content managed system.
Ive looked into master pages but they dont seem to really allow enough flexibility to do what I need to do as they require the definition of the whole document in them, but maybe ill have to work out some way to fudge it with those.
Im not sure what you are refering to about doing it backwards, the aspx page is the shell that loads up the user controls, and the user controls are what contain the dynamic content.
Hello.
Are you also removing the <head> section from the page? I've noticed in the past that if you remove the <html> tag but leave the <head runat="server"> you'll get that errror when you build the project in VS.
one more thing: you can use "filters" to apply different master pages to different browsers. for instance:
<%@.PageLanguage="C#"ie:MasterPageFile="~/Cap14/IE.master"MasterPageFile="~/Cap14/Mozilla.master"%>
applies a master page to IE and another to the other browsers. Check your browsers files to see the IDs of the browsers... oh, and you can alsouse adapters to render your pages/controls according to your needs in different browsers...
I don't think missing <html> element is an error. It is HTML markup validation message and is supposed to be a warning. Does it really break compilation or the page still runs? You can deal with the message in a few ways. First, you can disable validation in Tools | Options | Text Editor | HTML | Validation. Second, you can edit validation schema in Program Files\...\Common7\Packages\schemas\html (IE6_0.xsd, for example) and delete minOccurs="1" maxOccurs="1" from the <xsd:element name="html" >. Third, instead of using ASPX page, you can define your own file type, add it to the web.config and implement a handler for the type that will generate the response programmatically.
Giving it a fuller test it doesnt seem to break compilation on its own, I was getting other compilation errors too which were actually stopping it, but it does get reported as an error rather than a warning along with the other errors leading you to believe it is stopping compilation and needs to be fixed before you can compile.
I say just ignore it. If you are making an XML page, you can't have the <html> tag, for instance. So, just ignore it. That's what I do.
Thursday, March 22, 2012
The files are downloaded with the html code at the end of them
Try
Response.AddHeader("Content-Disposition", "attachment;filename=" & strFileName)
Dim fs As FileStream = New FileStream("C:\text.txt", FileMode.Open, FileAccess.Read)
Dim fileData As Byte()
ReDim fileData(fs.Length)
Dim bytesRead As Long = fs.Read(fileData, 0, CInt(fs.Length))
fs.Close()
Response.BinaryWrite(fileData)
Catch es as Exception
lblAlert.text = "It was a problem transferring the file."
end try
The problem is that if you open the files with 'notepad' you see that the html code of the page has been incorporated to the end of the file. Something like this:
***************Beginning of the file***************
0000114099 00000 n
0000114243 00000 n
0000114317 00000 n
trailer<</Size 62/ID<79e93880650e9d343ab0837ab878f5cd><79e93880650e9d343ab0837ab878f5cd>]>>
startxref 173 %%EOF
<html>
<head>
<title>HLC Intranet - HLC Eroom</title>
***************rest of the html code***************
Somebody knows what can be? How can I takeout the html code?
Thanks,
BriegaHi,
I presume this is some code-behind code. Check if there is still some html code in your page (this is created automatically when you create a new webform in vs.net). Delete the html code and only leave the Page-directive.
I struggled with this issue also last year and this is what worked for me:
Response.Clear()
Response.ContentType = scan.ContentType
Response.BinaryWrite(scan.Document)
Response.End()
Grz, Kris.
It works!!!
The only part of your code that I don't understand is the
Response.BinaryWrite(scan.Document)
Could you tell me what that does? I've copy the code without it and it works anyway.
Regards,
Briega
Sorry I typed wrong!
What I don't understand is:
Response.ContentType = scan.ContentType
Briega
I'm sorry, I took a little snippet out of my code. scan is an instantiation of a custom made class which retrieves the binary data and it's accompanying contenttype (pdft, excell, word, ...)
You can search for the content types on the internet.
Grz, Kris.