Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Thursday, March 29, 2012

html gets deleted

I'm using visual studio and working on some webforms.
the last few forms that I have created have been very
long and after I save the form - parts of the html get
deleted and I lose the objects at the bottom of the
page. the code however is still in the code behind
module. has anyone experienced this type of behavior?Bob,

Does this help?

324440 FIX: Data Loss When You Change Views in WebForm Designer

You didn't say what version of VS.NET. This is for 2002.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
jamesche@.online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

-------
>Content-Class: urn:content-classes:message
>From: "bob" <compbob_2000@.hotmail.com>
>Sender: "bob" <compbob_2000@.hotmail.com>
>Subject: html gets deleted
>Date: Mon, 27 Oct 2003 13:23:35 -0800
>Lines: 6
>Message-ID: <044701c39cd0$94ad1e90$a301280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcOc0JSqjfELt55HSwGM+sLqEOvXIw==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:186835
>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>I'm using visual studio and working on some webforms.
>the last few forms that I have created have been very
>long and after I save the form - parts of the html get
>deleted and I lose the objects at the bottom of the
>page. the code however is still in the code behind
>module. has anyone experienced this type of behavior?

HTML Forms not working in precompiled version

Hi everybody,
on a aspx page, i have a HTML form that on submit calls the aspx page
itself.
works fine in asp, in .NET 1.1, non precompiled .Net 2.0.
In the precompiled version of the .NET 2.0, the request.form in the
request after submitting the form is empty(request.form.count=0).again,
the code runs smoothly if the page is not precompiled
any ideas apprecicated
thanks in advance
Markus

Monday, March 26, 2012

HTML Form value retrieval

Yes. If you use the action attribute, it works fine. Here's an example, from
this working page
http://www.pmaconference.com/specia...04/register.htm

<form name="form" onsubmit="return(sendReg())"
action="https://energycatalogue.acomhosting.com/orderform.aspx"
"Matt" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:F7ED5A87-B31F-4BA8-A0A2-CFC966462174@dotnet.itags.org.microsoft.com...
> I have an aspx page whose purpose is to read a customer-provided HTML
form, display it, and reads the values from it on a postback. I cannot seem
to read the values from Request.Form when this type of form is posted back.
All I am trying to do is loop through the items in Request.Form and store
their values for later use in the application. Neither the "form" tag nor
the control tags use the runat="server" attribute since this is a
customer-created form that we would like to be standard HTML to allow full
control of the form contents, and look and feel of the form. There will
only ever be one client-side form per rendering of the page. By adding the
runat="server" attribute to the form tag, I have been able to see only one
item in the Request, _VIEWSTATE. None of the other HTML controls will
appear in the collection. Is this type of thing possible?Thanks for the reply. Even with the action on the form, I the Request.Form.Count value is also zero when I do a postback. Obviously there's something wrong, probably very basic. Below is the form that I am testing with. I've tried with and without the METHOD and ACTION attributes

<form name="autos" method="post" action="http://cregosource/privateparty/formdata.aspx"><input type="checkbox" id="check" value="checkvalue"><br><input type="checkbox" id="check2" value="checkvalue2"><br><input type="text" id="text" value="333333"><textarea id="mytextarea">asdf</textarea><input type="radio" id="myradio" value="1"><input type="radio" id="myradio" value="2"><input type="radio" id="myradio" value="3"><select id="myselect" size="5"><option>1</option><option>2</option></select><select id="myselectmultiple" size="5" multiple><option value="1">one</option><option value="2">two</option><option value="3">three</option><option value="4">four</option><option value="5">five</option></select><br><br><input type="submit" value="Submit"></form

And here's the code in a codebehind page that I'm debugging

if (Request.Form.Count>0)

foreach (string strReq in Request.Form)

oTrans.KeyAddOrReplace(PrivateParty.TranState.Sect ionType.Form,strReq,Request[strReq])

oTrans.SaveState()

Even if I omit the Count test, there are no items in the Form. Does it pose a problem if I am using usercontrols on this page? I do not specifically call out any form tags in these controls. Any additional help is much appreciated!

HTML File Parsing

hi,

like xml dom and xmlreader used for working with xml files.

how can i do this with html files.

i want find all the hyperlink tags <a> and change the href
attribute to my own value.

Thanks & Regards
Raja Balaji RI've used regular expressions to parse HTML. The .NET Regular Expression
classes are very powerful.
--
John Saunders
Internet Engineer
john.saunders@.surfcontrol.com

"Raja Balaji R" <rajabalaji_r@.hotmail.com> wrote in message
news:065301c358fc$b88ee040$a501280a@.phx.gbl...
> hi,
> like xml dom and xmlreader used for working with xml files.
> how can i do this with html files.
> i want find all the hyperlink tags <a> and change the href
> attribute to my own value.
> Thanks & Regards
> Raja Balaji R

Saturday, March 24, 2012

HTML Email.

Hi,

My booking system sends a HTML formated email as a recipt to the client
on completion of their booking. All is working well however it has been
pointed out to me that not all people's email clients will display the
reciept as HTML, if for instance the person has chosen to view email's as
plain text only, then the email will render as a unpleasent text. It is
crucial that the person visible see the information in the reciept presented
nicely, regardless of if there email client has been configured to show
email as HTML or plin text.

I have done a bit of research and found that I ca show either HTML of email
by altering a setting in the message headers.
My question is can I ammend the message headers directly through vb.net (or
any other dot net language) or will I have to use a third party component
for this, if so has anybody got any recomendations.

cheers

martin.System.Web.Mail.MailMessage exposes the Headers property, which will return
an IDictionary object that you can use to modify the headers.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Alex" <alex_REMOVE_9876@.yahoo.com> wrote in message
news:ebvSd5ApDHA.2456@.TK2MSFTNGP09.phx.gbl...
> Hi,
> My booking system sends a HTML formated email as a recipt to the client
> on completion of their booking. All is working well however it has been
> pointed out to me that not all people's email clients will display the
> reciept as HTML, if for instance the person has chosen to view email's as
> plain text only, then the email will render as a unpleasent text. It is
> crucial that the person visible see the information in the reciept
presented
> nicely, regardless of if there email client has been configured to show
> email as HTML or plin text.
> I have done a bit of research and found that I ca show either HTML of
email
> by altering a setting in the message headers.
> My question is can I ammend the message headers directly through vb.net
(or
> any other dot net language) or will I have to use a third party component
> for this, if so has anybody got any recomendations.
>
> cheers
> martin.
Hi Chris,

Thanks for that advice.

However I am a little perplexed by this property.
The documentation says

Specifies the custom headers that are transmitted with the e-mail message.

but the definitions says

[Visual Basic]
Public ReadOnly Property Headers As IDictionary

so what I am wondering is how exactly I set the headers of a attributes of a
read only property.

I can't seem to find any good examples of this, do you know of any or can
you point me in the right direction.

cheers

Alex.

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:OzslbcKpDHA.2612@.TK2MSFTNGP10.phx.gbl...
> System.Web.Mail.MailMessage exposes the Headers property, which will
return
> an IDictionary object that you can use to modify the headers.
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows XP
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Alex" <alex_REMOVE_9876@.yahoo.com> wrote in message
> news:ebvSd5ApDHA.2456@.TK2MSFTNGP09.phx.gbl...
> > Hi,
> > My booking system sends a HTML formated email as a recipt to the
client
> > on completion of their booking. All is working well however it has been
> > pointed out to me that not all people's email clients will display the
> > reciept as HTML, if for instance the person has chosen to view email's
as
> > plain text only, then the email will render as a unpleasent text. It is
> > crucial that the person visible see the information in the reciept
> presented
> > nicely, regardless of if there email client has been configured to show
> > email as HTML or plin text.
> > I have done a bit of research and found that I ca show either HTML of
> email
> > by altering a setting in the message headers.
> > My question is can I ammend the message headers directly through vb.net
> (or
> > any other dot net language) or will I have to use a third party componen
t
> > for this, if so has anybody got any recomendations.
> > cheers
> > martin.

Thursday, March 22, 2012

Html Control Changing Name Value

I am working on a complex server control that dynamically creates an
HtmlInputHidden control that stores its value. As far as the postback
process is concerned, this hidden input acts as the control itself. So
when I render, I generate a proxy HtmlInputHidden like so:

protected virtual void Render(HtmlTextWriter writer)
{
HtmlInputHidden hiddenInput = new HtmlInputHidden();
hiddenInput.ID = ClientID;
hiddenInput.Name = UniqueID;
hiddenInput.Value = SelectedScopeID.ToString();
hiddenInput.RenderControl(writer);
}

When I look at the value of UniqueID inside the Render method, it has
colons in it, but for some reason, the name is being rendered to the
page using underscores instead. This, of course, causes my
LoadPostData method to fail, since the postDataKey has colons, not
underscores. Anyone have any idea why this could be happening?I have discovered the solution to this problem, but not the cause.
This behavior is in Framework 1.1, by the way, and it appears to be a
bug, though I'd like someone from Microsoft to confirm this.

In my control, I am trying to use a HtmlInputHidden control as a proxy
for a more complex control, so that no matter how I choose to render
the control, I will always have a single value come back. I create the
HtmlInputHidden control on PreRender, and then inside the Render
method, I render the other controls by hand and then pass the
HtmlTextWriter to the RenderControl method of the HtmlInputHidden
object.

In order to have things work correctly, I set the ID of the
HtmlInputHidden control to the surrounding control's ClientID, and the
name of the HtmlInputHidden control to the control's UniqueID, just as
I supposed I would have to. But strangely, when it rendered the
control, it rendered the ClientID to both attributes like this:
<input name="ucSearchFilters_scope" id="ucSearchFilters_scope"
type="hidden" value="-1" />

This, of course, will break the LoadPostData method, because the
postDataKey passed to it is "ucSearchFilters:scope" (with a colon), but
the name of the control is "ucSearchFilters_scope" (with an
underscore).

After experimenting with the HtmlInputHidden control a bit, I
discovered that once I set the ID on the control, then it copies this
value to the Name and will not allow it to be changed. So if you try
to set the Name after setting the ID, it will simply ignore the change.

If you do not set the ID at all, even if you set the name, it renders
like so:
<input name type="hidden" value="-1" />

This may or may not be valid HTML (I know that at least old versions of
HTML do not require attributes to have values, e.g. nowrap), but since
it has no ID, it is invisible to standard ECMA/JavaScript, and its
value will not be posted back because it has no Name.

This appears to be the behavior with any controls that do not have an
ID set. For example, on PreRender, I generated a DropDownList control
with no ID and then just called RenderControl on it, passing through
the HtmlTextWriter at render time. This displayed the same behavior:
<select name... </select>

The workaround to my particular problem is to set the
HtmlInputHidden.ID to the control's UniqueID -- which seems wrong,
since the UniqueID should be used as a name, not an ID, and ClientID
should be used as the ID. But inexplicably, when you set the ID to the
value of your containing control's UniqueID, it all renders correctly:
<input name="ucSearchFilters:scope" id="ucSearchFilters_scope"
type="hidden" value="-1" />

I hope this helps someone else who may have been banging their head
against a wall. Can someone confirm whether this is a bug?

dcassar@.cmcdataworks.com wrote:

Quote:

Originally Posted by

I am working on a complex server control that dynamically creates an
HtmlInputHidden control that stores its value. As far as the postback
process is concerned, this hidden input acts as the control itself. So
when I render, I generate a proxy HtmlInputHidden like so:
>
protected virtual void Render(HtmlTextWriter writer)
{
HtmlInputHidden hiddenInput = new HtmlInputHidden();
hiddenInput.ID = ClientID;
hiddenInput.Name = UniqueID;
hiddenInput.Value = SelectedScopeID.ToString();
hiddenInput.RenderControl(writer);
}
>
When I look at the value of UniqueID inside the Render method, it has
colons in it, but for some reason, the name is being rendered to the
page using underscores instead. This, of course, causes my
LoadPostData method to fail, since the postDataKey has colons, not
underscores. Anyone have any idea why this could be happening?


In article <1154714999.990563.98080@.m79g2000cwm.googlegroups.c om>,
dcassar@.cmcdataworks.com writes

Quote:

Originally Posted by

>But strangely, when it rendered the control, it rendered the ClientID
>to both attributes like this: <input name="ucSearchFilters_scope"
>id="ucSearchFilters_scope" type="hidden" value="-1" />
>
>This, of course, will break the LoadPostData method, because the
>postDataKey passed to it is "ucSearchFilters:scope" (with a colon), but
>the name of the control is "ucSearchFilters_scope" (with an underscore).


Don't know about the rest of your woes, but the reason for this is very
simple. Colons are not valid in element IDs. In order to produce valid
XHTML, colons are replaced by underscores. This is not a bug, this is by
design to produce valid XHTML.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Alan:

The problem is that the behavior is inconsistent. Names should use
colons and IDs should use underscores. Name attributes should map to
the UniqueID property; ID attributes should map to the ClientID
property. However, this is not what is happening.

Dan

Alan Silver wrote:

Quote:

Originally Posted by

In article <1154714999.990563.98080@.m79g2000cwm.googlegroups.c om>,
dcassar@.cmcdataworks.com writes

Quote:

Originally Posted by

But strangely, when it rendered the control, it rendered the ClientID
to both attributes like this: <input name="ucSearchFilters_scope"
id="ucSearchFilters_scope" type="hidden" value="-1" />

This, of course, will break the LoadPostData method, because the
postDataKey passed to it is "ucSearchFilters:scope" (with a colon), but
the name of the control is "ucSearchFilters_scope" (with an underscore).


>
Don't know about the rest of your woes, but the reason for this is very
simple. Colons are not valid in element IDs. In order to produce valid
XHTML, colons are replaced by underscores. This is not a bug, this is by
design to produce valid XHTML.
>
HTH
>
--
Alan Silver
(anything added below this line is nothing to do with me)

HTML completion - VS.NET 7.1

Hi,
I'm working on an ASP.NET application, written in C#, using VS.NET .
When working on aspx pages, HTML completion does not work (neither tag
closing nor statement completion). Completion works fine for code behind
files and for HTML written in ascx user control files.
My definitions looks fine:
Tools->Options->Test Editor->HTML/XML->HTML specific:
* 'Auto pop-up HTML statement completion' is checked.
* 'Auto pop-up scripting statement completion' is checked.
* 'Close tag' is checked.
If anyone has any ideas or directions it would be a big help.
Thanks

HTML completion - VS.NET 7.1

Hi,
I'm working on an ASP.NET application, written in C#, using VS.NET .
When working on aspx pages, HTML completion does not work (neither tag
closing nor statement completion). Completion works fine for code behind
files and for HTML written in ascx user control files.
My definitions looks fine:
Tools->Options->Test Editor->HTML/XML->HTML specific:
* 'Auto pop-up HTML statement completion' is checked.
* 'Auto pop-up scripting statement completion' is checked.
* 'Close tag' is checked.
If anyone has any ideas or directions it would be a big help.
Thanks

HTML code warnings in asp.net html code view

Hi,
This is a silly question. I'm relatively new to asp.net and asp at all. But
I always had this doubt.
I'm working with Visual Studio and while exploring the ASPCommerce starter
kit, when I switch from design view to html code view, I see many keywords
underlied, like if they were invalid, however, they're not, they display
fine and the project runs fine.
Example, the next, the "link" keyword is underlied and it popups to : "the
active scheme does not support element link"
<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css">
More, all the margin related attribute, are marked as : Could not find any
attribute "leftmargin" of element body
<body background="images/sitebkgrdnogray.gif" leftmargin="0" topmargin="0"
rightmargin="0"
bottommargin="0" marginheight="0" marginwidth="0">
And so on ...
So, could someone explain, what are all these warnings and where they are
comming from ?
Regards,Hi,
It's the VS internal html validation, which by default (with no meta header
"vs_targetSchema" in the head) validates against IE 3/NN 3. If you set the
document property targetSchema to Internet Explorer 5 most, if not all, of
these "errors" will disappear.
Greetings
Martin
"Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
news:OUcqF5HrEHA.3408@.TK2MSFTNGP10.phx.gbl...
> Hi,
> This is a silly question. I'm relatively new to asp.net and asp at all.
But
> I always had this doubt.
> I'm working with Visual Studio and while exploring the ASPCommerce starter
> kit, when I switch from design view to html code view, I see many keywords
> underlied, like if they were invalid, however, they're not, they display
> fine and the project runs fine.
> Example, the next, the "link" keyword is underlied and it popups to : "the
> active scheme does not support element link"
> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css">
> More, all the margin related attribute, are marked as : Could not find any
> attribute "leftmargin" of element body
> <body background="images/sitebkgrdnogray.gif" leftmargin="0"
topmargin="0"
> rightmargin="0"
> bottommargin="0" marginheight="0" marginwidth="0">
> And so on ...
> So, could someone explain, what are all these warnings and where they are
> comming from ?
>
> Regards,
>
>
Martin :
Thanks, I did it, set it to Internet Explorer 5.0 (the higher option
available there), and in fact it disappeared almost all.
However, these still there warning:
marginheight="0" marginwidth="0"
What does this have as special ?
Regards,
"Martin Dechev" <detcheff_@.hotmail.com> wrote in message
news:Oga7WOIrEHA.1900@.TK2MSFTNGP10.phx.gbl...
> Hi,
> It's the VS internal html validation, which by default (with no meta
> header
> "vs_targetSchema" in the head) validates against IE 3/NN 3. If you set the
> document property targetSchema to Internet Explorer 5 most, if not all, of
> these "errors" will disappear.
> Greetings
> Martin
> "Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
> news:OUcqF5HrEHA.3408@.TK2MSFTNGP10.phx.gbl...
> But
> topmargin="0"
>
Hi,
These are not in the w3c standards (they are in fact, but apply only for
frame and iframe) and will be ignored by browsers. I prefer setting the
margins of the body of the document using the style attribute:
<body style="margin: 0px;">
or assigning it a css class alternatively.
Greetings
Martin
"Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
news:OC1TqVIrEHA.3288@.TK2MSFTNGP12.phx.gbl...
> Martin :
> Thanks, I did it, set it to Internet Explorer 5.0 (the higher option
> available there), and in fact it disappeared almost all.
> However, these still there warning:
> marginheight="0" marginwidth="0"
> What does this have as special ?
> Regards,
>
> "Martin Dechev" <detcheff_@.hotmail.com> wrote in message
> news:Oga7WOIrEHA.1900@.TK2MSFTNGP10.phx.gbl...
the
of
display
are
>

HTML code warnings in asp.net html code view

Hi,

This is a silly question. I'm relatively new to asp.net and asp at all. But
I always had this doubt.

I'm working with Visual Studio and while exploring the ASPCommerce starter
kit, when I switch from design view to html code view, I see many keywords
underlied, like if they were invalid, however, they're not, they display
fine and the project runs fine.

Example, the next, the "link" keyword is underlied and it popups to : "the
active scheme does not support element link"

<link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css"
More, all the margin related attribute, are marked as : Could not find any
attribute "leftmargin" of element body

<body background="images/sitebkgrdnogray.gif" leftmargin="0" topmargin="0"
rightmargin="0"
bottommargin="0" marginheight="0" marginwidth="0"
And so on ...

So, could someone explain, what are all these warnings and where they are
comming from ?

Regards,Hi,

It's the VS internal html validation, which by default (with no meta header
"vs_targetSchema" in the head) validates against IE 3/NN 3. If you set the
document property targetSchema to Internet Explorer 5 most, if not all, of
these "errors" will disappear.

Greetings
Martin
"Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
news:OUcqF5HrEHA.3408@.TK2MSFTNGP10.phx.gbl...
> Hi,
> This is a silly question. I'm relatively new to asp.net and asp at all.
But
> I always had this doubt.
> I'm working with Visual Studio and while exploring the ASPCommerce starter
> kit, when I switch from design view to html code view, I see many keywords
> underlied, like if they were invalid, however, they're not, they display
> fine and the project runs fine.
> Example, the next, the "link" keyword is underlied and it popups to : "the
> active scheme does not support element link"
> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css">
> More, all the margin related attribute, are marked as : Could not find any
> attribute "leftmargin" of element body
> <body background="images/sitebkgrdnogray.gif" leftmargin="0"
topmargin="0"
> rightmargin="0"
> bottommargin="0" marginheight="0" marginwidth="0">
> And so on ...
> So, could someone explain, what are all these warnings and where they are
> comming from ?
>
> Regards,
>
Martin :

Thanks, I did it, set it to Internet Explorer 5.0 (the higher option
available there), and in fact it disappeared almost all.
However, these still there warning:

marginheight="0" marginwidth="0"

What does this have as special ?

Regards,

"Martin Dechev" <detcheff_@.hotmail.com> wrote in message
news:Oga7WOIrEHA.1900@.TK2MSFTNGP10.phx.gbl...
> Hi,
> It's the VS internal html validation, which by default (with no meta
> header
> "vs_targetSchema" in the head) validates against IE 3/NN 3. If you set the
> document property targetSchema to Internet Explorer 5 most, if not all, of
> these "errors" will disappear.
> Greetings
> Martin
> "Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
> news:OUcqF5HrEHA.3408@.TK2MSFTNGP10.phx.gbl...
>> Hi,
>>
>> This is a silly question. I'm relatively new to asp.net and asp at all.
> But
>> I always had this doubt.
>>
>> I'm working with Visual Studio and while exploring the ASPCommerce
>> starter
>> kit, when I switch from design view to html code view, I see many
>> keywords
>> underlied, like if they were invalid, however, they're not, they display
>> fine and the project runs fine.
>>
>> Example, the next, the "link" keyword is underlied and it popups to :
>> "the
>> active scheme does not support element link"
>>
>> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css">
>>
>> More, all the margin related attribute, are marked as : Could not find
>> any
>> attribute "leftmargin" of element body
>>
>> <body background="images/sitebkgrdnogray.gif" leftmargin="0"
> topmargin="0"
>> rightmargin="0"
>> bottommargin="0" marginheight="0" marginwidth="0">
>>
>> And so on ...
>>
>> So, could someone explain, what are all these warnings and where they are
>> comming from ?
>>
>>
>> Regards,
>>
>>
>>
>>
Hi,

These are not in the w3c standards (they are in fact, but apply only for
frame and iframe) and will be ignored by browsers. I prefer setting the
margins of the body of the document using the style attribute:

<body style="margin: 0px;"
or assigning it a css class alternatively.

Greetings
Martin
"Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
news:OC1TqVIrEHA.3288@.TK2MSFTNGP12.phx.gbl...
> Martin :
> Thanks, I did it, set it to Internet Explorer 5.0 (the higher option
> available there), and in fact it disappeared almost all.
> However, these still there warning:
> marginheight="0" marginwidth="0"
> What does this have as special ?
> Regards,
>
> "Martin Dechev" <detcheff_@.hotmail.com> wrote in message
> news:Oga7WOIrEHA.1900@.TK2MSFTNGP10.phx.gbl...
> > Hi,
> > It's the VS internal html validation, which by default (with no meta
> > header
> > "vs_targetSchema" in the head) validates against IE 3/NN 3. If you set
the
> > document property targetSchema to Internet Explorer 5 most, if not all,
of
> > these "errors" will disappear.
> > Greetings
> > Martin
> > "Craig Kenisston" <craigkenisston@.hotmail.com> wrote in message
> > news:OUcqF5HrEHA.3408@.TK2MSFTNGP10.phx.gbl...
> >> Hi,
> >>
> >> This is a silly question. I'm relatively new to asp.net and asp at all.
> > But
> >> I always had this doubt.
> >>
> >> I'm working with Visual Studio and while exploring the ASPCommerce
> >> starter
> >> kit, when I switch from design view to html code view, I see many
> >> keywords
> >> underlied, like if they were invalid, however, they're not, they
display
> >> fine and the project runs fine.
> >>
> >> Example, the next, the "link" keyword is underlied and it popups to :
> >> "the
> >> active scheme does not support element link"
> >>
> >> <link rel="stylesheet" type="text/css" href="http://links.10026.com/?link=ASPNETCommerce.css">
> >>
> >> More, all the margin related attribute, are marked as : Could not find
> >> any
> >> attribute "leftmargin" of element body
> >>
> >> <body background="images/sitebkgrdnogray.gif" leftmargin="0"
> > topmargin="0"
> >> rightmargin="0"
> >> bottommargin="0" marginheight="0" marginwidth="0">
> >>
> >> And so on ...
> >>
> >> So, could someone explain, what are all these warnings and where they
are
> >> comming from ?
> >>
> >>
> >> Regards,
> >>
> >>
> >>
> >>

HTML code blocked by Response.OutputStream.Write

I'm working on a site that creates mailing labels. When a label is
generated, two things happen in the background with the image.

First, it is saved as a smaller low-quality .gif on the server and
then presented as a preview using an img tag (also later used for a
history feature on the site).

Second, when the user clicks on the image, a new window appears with
only the mailing label as a high-quality .png graphic. I don't save
the .png image to conserve hardrive space, so I use
response.outputstream.write to output the image array. I do this
because it is important to have crisp barcodes on the labels.

The problem is that by doing this, the html in the aspx file isn't
sent to the client, just the image. I would like to use
window.print() on the client side. I tried using
Page.RegisterStartUpScript; it runs, but isn't output to the user no
matter if it is ran before or after the OutputStream.

Anyone else seen a similar problem?

Is there a way to display an image that is in server memory to an
image tag?Richard wrote:
> Is there a way to display an image that is in server memory to an
> image tag?

Yes there is. Set the img src to a aspx page:

<img src="http://pics.10026.com/?src=myImageWriter.aspx".../
myImageWriter.aspx must only output your binary data for the image, by
changing the content-type and then using Response.BinaryWrite to write
the bytes to the response stream. Here's one example, look at
ViewImage.aspx and its code-behind:

http://www.developerfusion.com/show/3933/4/

Sorry, it's actually a halfway-there example, but the only one I could
find. Note you should do a Response.Clear before doing anything else
with the Response object. A Response.Flush and Response.End afterwards
would really make sure no extraneous output (HTML, text, etc.) makes it
along with the binary. And make sure you don't set Response.Buffer =
false (by default it's true).

--
Craig Deelsnyder
Microsoft MVP - ASP.NET
Nice little trick and it works great for my project. Thanks for the
help.

I still curious why the outputstream was overwriting the html. Is it
supposed to this?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Richard Huff wrote:

> Nice little trick and it works great for my project. Thanks for the
> help.
> I still curious why the outputstream was overwriting the html. Is it
> supposed to this?
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Um, not sure. Was there a Response.Flush/Response.End somewhere in the
code? The HTML in your page (as you pry see it in your .aspx) isn't
output until after Page_Load (and other page related events) run. Via
the Render event/method (once again assuming the default of .Buffer =
true).

Outputting more than one MIME type in the same stream usually corrupts
the stream (the browser doesn't know what it is, like a corrupted file
in Windows). At least I thought so...

--
Craig Deelsnyder
Microsoft MVP - ASP.NET