Hi,
When I use
Response.Write "something"
it is placed at the top op de html document above the <HTML> tag.
I need it to be put in the BODY part.
How can I do this?
rg,
Eric 22 1566
Well, you've got 2 choices:
1. Use ASP (looks like what you're used to)
2. Learn ASP.Net's Object-oriented programming model.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"EMW" <so*****@MikroZoft.com> wrote in message
news:42**********************@dreader2.news.tiscal i.nl... Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part.
How can I do this?
rg, Eric
Response.Write is almost never used any more, mainly because of the reason
you pointed out.
Instead you should probably use a Label control, a PlaceHolder control, or
some other control, since they can be placed precisely at design time.
Then you can set it from your code behind like this:
Label1.Text="Whatever"
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://SteveOrr.net
"EMW" <so*****@MikroZoft.com> wrote in message
news:42**********************@dreader2.news.tiscal i.nl... Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part.
How can I do this?
rg, Eric
Response.Write is ver much against the entire zen of ASP.NET's object model.
Sure, use it for debugging (though Trace.Write is much better), but you shouldn't
be using it for rendering your page. If you want something to be added to
your page, put a <asp:Label runat=server id=_myInfo /> (or some other server
side control) and set the _myInfo.Text proeprty to the string you want visible.
This is a higher level object model that's very different than classic ASP.
It's definetly different, but a much more productive model once you get used
to it.
-Brock
DevelopMentor http://staff.develop.com/ballen Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part.
How can I do this?
rg, Eric
This might make more sense and this is what I do.
Create a new aspx page and at the top put a PlaceHolder control. Call
it something like PH1. Next, you need to append your page content to
the pageholder. So lets say the first thing on the page is a heading:
Dim T1 as New LiteralControl
T1.Text = "<FONT Face = ""Arial"">This is my heading</FONT>"
T1.ID = "T1" ' Optional
PH1.Controls.Add(T1)
Dim B1 as new Button
B1.Text = "Submit"
B1.ID = SomeVal
PH1.Controls.Add(B1)
When this page is loaded you'll get a heading and a button below it.
For more complex pages with tables an so on I typically define strings
like:
TableStart as String = "<TABLE><TR><TD>"
MyContent as String = "<DIV Align=Center>My Content!</DIV>"
TableEnd as String = "</TD></TR></TABLE>"
I then define 3 LiteralControl's, assign the text to them and add them
in order to the placeholder. I found this method much more flexible
for inserting error texts into the page (actually into the placeholder
order). I use response.write only for temporary debugging messsages.
You can also visually design a skeleton of your page and put
placeholders where you want dynamic content to appear. I recently did
an entire aspx page of nothing but dynamically created controls and
content. It works very well.
Pardon any errors above but it's a better answer than 'rtfm'. ;)
On Tue, 29 Mar 2005 22:19:59 +0200, "EMW" <so*****@MikroZoft.com>
wrote: Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part.
How can I do this?
rg, Eric
Hello Kevin,
And this response helped how?
In the time that it takes to come off with an answer like this, why not construct
an answer that may remotely help the original poster?
--
Matt Berther http://www.mattberther.com Well, you've got 2 choices:
1. Use ASP (looks like what you're used to) 2. Learn ASP.Net's Object-oriented programming model. Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "EMW" <so*****@MikroZoft.com> wrote in message news:42**********************@dreader2.news.tiscal i.nl...
Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part. How can I do this?
rg, Eric
> And this response helped how?
I have no idea. A response can help, but it is up to the receiver to make it
help. A doctor can prescribe medicine, but if the patient doesn't take it,
the patient doesn't get well. In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
Well, now, if I were a doctor, and someone came into my office with a cough,
I suppose I could give them some cough syrup and send them on their merry
way. Somehow I get the feeling that this is what you would do. A GOOD doctor
would examine the patient, determine the disease that is causing the
symptoms, and prescribe some medicine that would kill the disease, not
simply make the patient stop coughing.
In this case, my self-appointed Mentor, I diagnosed that the poster had
virtually no experience with Object-oriented programming, and was trying to
work with technology that he was almost completely unfamiliar with. How did
I diagnose this? Well, I read between the lines. Wish I could explain the
technique to you, but it requires some abstract thought to comprehend.
I could have given him some cough syrup and sent him on his merry way. My
conscience wouldn't allow me to do that. So, I risked your wrath, and the
wrath of all the other self-appointed judges out there, and told him what he
needed to hear, not necessarily what he wanted to hear. Sue me.
BTW, how much did your post help him? Or did you just want to be recognized
as a beacon of compassion in a coldly logical world?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Matt Berther" <mb******@hotmail.com> wrote in message
news:22***************************@news.microsoft. com... Hello Kevin,
And this response helped how?
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
-- Matt Berther http://www.mattberther.com
Well, you've got 2 choices:
1. Use ASP (looks like what you're used to) 2. Learn ASP.Net's Object-oriented programming model. Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "EMW" <so*****@MikroZoft.com> wrote in message news:42**********************@dreader2.news.tiscal i.nl...
Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part. How can I do this?
rg, Eric
On Tue, 29 Mar 2005 16:48:07 -0500, "Kevin Spencer"
<ke***@DIESPAMMERSDIEtakempis.com> wrote: I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
So the better solution is 'rtfm'? I'm sure he's out there buried in
textbooks for weeks trying to figure out what I gave him in 3
paragraphs. I asked the same question once. I got a reply like yours
which was 100% useless and a small code example like the one I
provided. I had my pages working in hours.
Anyone can say read the manual. Knowledgable people answer his
question.
Tom wilson wrote: This might make more sense and this is what I do.
Create a new aspx page and at the top put a PlaceHolder control.
Call it something like PH1. Next, you need to append your page content to the pageholder. So lets say the first thing on the page is a
heading: Dim T1 as New LiteralControl T1.Text = "<FONT Face = ""Arial"">This is my heading</FONT>" T1.ID = "T1" ' Optional PH1.Controls.Add(T1)
Dim B1 as new Button B1.Text = "Submit" B1.ID = SomeVal PH1.Controls.Add(B1)
When this page is loaded you'll get a heading and a button below it. For more complex pages with tables an so on I typically define
strings like:
TableStart as String = "<TABLE><TR><TD>" MyContent as String = "<DIV Align=Center>My Content!</DIV>" TableEnd as String = "</TD></TR></TABLE>"
I then define 3 LiteralControl's, assign the text to them and add
them in order to the placeholder. I found this method much more flexible for inserting error texts into the page (actually into the
placeholder order). I use response.write only for temporary debugging messsages. You can also visually design a skeleton of your page and put placeholders where you want dynamic content to appear. I recently
did an entire aspx page of nothing but dynamically created controls and content. It works very well.
Tom, this answer helped me a lot. Just like the original poster, I did
not know how to write dynamic content to the page. Thanks!
-Steve
Did I tell him to "read the manual?"
Glad you got your stuff "working." So, why are you still here? Perhaps you
didn't advance your knowledge, and still need someone to do your fishing for
you?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Tom wilson" <ye*******@nospam.com> wrote in message
news:05********************************@4ax.com... On Tue, 29 Mar 2005 16:48:07 -0500, "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote:
I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
So the better solution is 'rtfm'? I'm sure he's out there buried in textbooks for weeks trying to figure out what I gave him in 3 paragraphs. I asked the same question once. I got a reply like yours which was 100% useless and a small code example like the one I provided. I had my pages working in hours.
Anyone can say read the manual. Knowledgable people answer his question.
BTW, Tom, if you don't like the advice, ignore it. If you think you have
better advice to give, then give it. What advice I give is none of your
business. Or are you the self-appointed guardian of the Internet?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Tom wilson" <ye*******@nospam.com> wrote in message
news:05********************************@4ax.com... On Tue, 29 Mar 2005 16:48:07 -0500, "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote:
I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
So the better solution is 'rtfm'? I'm sure he's out there buried in textbooks for weeks trying to figure out what I gave him in 3 paragraphs. I asked the same question once. I got a reply like yours which was 100% useless and a small code example like the one I provided. I had my pages working in hours.
Anyone can say read the manual. Knowledgable people answer his question.
Hello Kevin,
First of all, dont tell me what you think I would do. My track record in
this newsgroup and the others I participate in speaks for itself. I much
prefer to point people towards a solution rather than providing a ready made
one. You know, teach a man to fish...
Listening to you though, it would appear that you think you are the only
GOOD person in this newsgroup. Most everyone else does not have a problem
putting forth a simple solution to help out and directing the poster to additional
information if they feel it necessary.
You know, a majority of the people posting questions in this newsgroup probably
do not understand the fundamentals of OOP. Why not just make it a prerequiste
that they master these fundamentals prior to asking a simple question?
Need to know how to do something with ASP.NET? Learn the intricacies of Object
Oriented Programming first.
Need to know how to make a line of text end up in the <body> section? Before
we do that, why dont you master the principles of inheritance, polymorphism
and encapsulation.
Give me a frickin break...
As far as my post helping the original poster... Perhaps you failed to realize
in your god-like state that I was responding to you and your condescending
tone. I'm still baffled that an MVP can conduct him/herself in this manner
in a Microsoft sponsored public forum.
--
Matt Berther http://www.mattberther.com And this response helped how? I have no idea. A response can help, but it is up to the receiver to make it help. A doctor can prescribe medicine, but if the patient doesn't take it, the patient doesn't get well.
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster? Well, now, if I were a doctor, and someone came into my office with a cough, I suppose I could give them some cough syrup and send them on their merry way. Somehow I get the feeling that this is what you would do. A GOOD doctor would examine the patient, determine the disease that is causing the symptoms, and prescribe some medicine that would kill the disease, not simply make the patient stop coughing.
In this case, my self-appointed Mentor, I diagnosed that the poster had virtually no experience with Object-oriented programming, and was trying to work with technology that he was almost completely unfamiliar with. How did I diagnose this? Well, I read between the lines. Wish I could explain the technique to you, but it requires some abstract thought to comprehend.
I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
BTW, how much did your post help him? Or did you just want to be recognized as a beacon of compassion in a coldly logical world?
Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "Matt Berther" <mb******@hotmail.com> wrote in message news:22***************************@news.microsoft. com...
Hello Kevin,
And this response helped how?
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
-- Matt Berther http://www.mattberther.com Well, you've got 2 choices:
1. Use ASP (looks like what you're used to) 2. Learn ASP.Net's Object-oriented programming model. Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "EMW" <so*****@MikroZoft.com> wrote in message news:42**********************@dreader2.news.tiscal i.nl... Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part. How can I do this? rg, Eric
Thanks Tom.
Also thanks for those in this thread who tried to help.
As for the ones having a discussion on how to answer a message....take it to
another newsgroup.
Tom,
I am trying to add a <MAP MAP="map1"><AREA .....><AREA.......></MAP> section
to my aspx page.
AS I understand your example, I should just use a placeholder, somewhere on
the page?
rg,
Eric
"Tom wilson" <ye*******@nospam.com> schreef in bericht
news:th********************************@4ax.com... This might make more sense and this is what I do.
Create a new aspx page and at the top put a PlaceHolder control. Call it something like PH1. Next, you need to append your page content to the pageholder. So lets say the first thing on the page is a heading:
Dim T1 as New LiteralControl T1.Text = "<FONT Face = ""Arial"">This is my heading</FONT>" T1.ID = "T1" ' Optional PH1.Controls.Add(T1)
Dim B1 as new Button B1.Text = "Submit" B1.ID = SomeVal PH1.Controls.Add(B1)
When this page is loaded you'll get a heading and a button below it. For more complex pages with tables an so on I typically define strings like:
TableStart as String = "<TABLE><TR><TD>" MyContent as String = "<DIV Align=Center>My Content!</DIV>" TableEnd as String = "</TD></TR></TABLE>"
I then define 3 LiteralControl's, assign the text to them and add them in order to the placeholder. I found this method much more flexible for inserting error texts into the page (actually into the placeholder order). I use response.write only for temporary debugging messsages. You can also visually design a skeleton of your page and put placeholders where you want dynamic content to appear. I recently did an entire aspx page of nothing but dynamically created controls and content. It works very well.
Pardon any errors above but it's a better answer than 'rtfm'. ;)
On Tue, 29 Mar 2005 22:19:59 +0200, "EMW" <so*****@MikroZoft.com> wrote:
Hi,
When I use Response.Write "something" it is placed at the top op de html document above the <HTML> tag. I need it to be put in the BODY part.
How can I do this?
rg, Eric
> My track record in this newsgroup and the others I participate in speaks for itself.
Googled newsgroups on "Matt Berther". 687 results.
Googled newsgroups on "Kevin Spencer" asp.net. 4,560 results.
Listening to you though, it would appear that you think you are the only GOOD person in this newsgroup.
It is irrelevant what Kevin thinks. What is relevant, that his answers are
the most valuable asset of this newsgroup. Note that I don't know Kevin
personally.
Most everyone else does not have a problem putting forth a simple solution to help out and directing the poster to
additional information if they feel it necessary.
Depends on how much time you have to write answers. What makes you think
that 10 minutes of my time is less valuable than 2 hours of the original
poster's work? And, as Kevin noted, you can always ignore an answer if you
don't like/understand it.
Eliyahu
Don't you have somebody else's business to mind? I think there's an opening
in Florida.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Matt Berther" <mb******@hotmail.com> wrote in message
news:22***************************@news.microsoft. com... Hello Kevin,
First of all, dont tell me what you think I would do. My track record in this newsgroup and the others I participate in speaks for itself. I much prefer to point people towards a solution rather than providing a ready made one. You know, teach a man to fish...
Listening to you though, it would appear that you think you are the only GOOD person in this newsgroup. Most everyone else does not have a problem putting forth a simple solution to help out and directing the poster to additional information if they feel it necessary.
You know, a majority of the people posting questions in this newsgroup probably do not understand the fundamentals of OOP. Why not just make it a prerequiste that they master these fundamentals prior to asking a simple question? Need to know how to do something with ASP.NET? Learn the intricacies of Object Oriented Programming first. Need to know how to make a line of text end up in the <body> section? Before we do that, why dont you master the principles of inheritance, polymorphism and encapsulation.
Give me a frickin break...
As far as my post helping the original poster... Perhaps you failed to realize in your god-like state that I was responding to you and your condescending tone. I'm still baffled that an MVP can conduct him/herself in this manner in a Microsoft sponsored public forum.
-- Matt Berther http://www.mattberther.com
And this response helped how? I have no idea. A response can help, but it is up to the receiver to make it help. A doctor can prescribe medicine, but if the patient doesn't take it, the patient doesn't get well.
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster? Well, now, if I were a doctor, and someone came into my office with a cough, I suppose I could give them some cough syrup and send them on their merry way. Somehow I get the feeling that this is what you would do. A GOOD doctor would examine the patient, determine the disease that is causing the symptoms, and prescribe some medicine that would kill the disease, not simply make the patient stop coughing.
In this case, my self-appointed Mentor, I diagnosed that the poster had virtually no experience with Object-oriented programming, and was trying to work with technology that he was almost completely unfamiliar with. How did I diagnose this? Well, I read between the lines. Wish I could explain the technique to you, but it requires some abstract thought to comprehend.
I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
BTW, how much did your post help him? Or did you just want to be recognized as a beacon of compassion in a coldly logical world?
Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "Matt Berther" <mb******@hotmail.com> wrote in message news:22***************************@news.microsoft. com...
Hello Kevin,
And this response helped how?
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
-- Matt Berther http://www.mattberther.com Well, you've got 2 choices:
1. Use ASP (looks like what you're used to) 2. Learn ASP.Net's Object-oriented programming model. Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "EMW" <so*****@MikroZoft.com> wrote in message news:42**********************@dreader2.news.tiscal i.nl... > Hi, > > When I use > Response.Write "something" > it is placed at the top op de html document above the <HTML> tag. > I need it to be put in the BODY part. > How can I do this? > rg, > Eric
Why would you use a literal control for this? Wouldn't a better solution be
to an HtmlTable and add that to the place holder. Creating strings for your
html really reeks of someone who moved up to asp .net from asp and still
doesn't know what they're doing.
I moved from nothing (with a little knowledge of html and still growing
experience of vb.net) to ASP.NET.
"Scott Simons" <Scott.Simons.At.MealMagic.Com.Remove.This> schreef in
bericht news:91**********************************@microsof t.com... Why would you use a literal control for this? Wouldn't a better solution be to an HtmlTable and add that to the place holder. Creating strings for your html really reeks of someone who moved up to asp .net from asp and still doesn't know what they're doing.
Please stop this....
this newsgroup is for grown ups only!
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> schreef in bericht
news:eR**************@TK2MSFTNGP10.phx.gbl... Don't you have somebody else's business to mind? I think there's an opening in Florida.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get.
"Matt Berther" <mb******@hotmail.com> wrote in message news:22***************************@news.microsoft. com... Hello Kevin,
First of all, dont tell me what you think I would do. My track record in this newsgroup and the others I participate in speaks for itself. I much prefer to point people towards a solution rather than providing a ready made one. You know, teach a man to fish...
Listening to you though, it would appear that you think you are the only GOOD person in this newsgroup. Most everyone else does not have a problem putting forth a simple solution to help out and directing the poster to additional information if they feel it necessary.
You know, a majority of the people posting questions in this newsgroup probably do not understand the fundamentals of OOP. Why not just make it a prerequiste that they master these fundamentals prior to asking a simple question? Need to know how to do something with ASP.NET? Learn the intricacies of Object Oriented Programming first. Need to know how to make a line of text end up in the <body> section? Before we do that, why dont you master the principles of inheritance, polymorphism and encapsulation.
Give me a frickin break...
As far as my post helping the original poster... Perhaps you failed to realize in your god-like state that I was responding to you and your condescending tone. I'm still baffled that an MVP can conduct him/herself in this manner in a Microsoft sponsored public forum.
-- Matt Berther http://www.mattberther.com
And this response helped how?
I have no idea. A response can help, but it is up to the receiver to make it help. A doctor can prescribe medicine, but if the patient doesn't take it, the patient doesn't get well.
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
Well, now, if I were a doctor, and someone came into my office with a cough, I suppose I could give them some cough syrup and send them on their merry way. Somehow I get the feeling that this is what you would do. A GOOD doctor would examine the patient, determine the disease that is causing the symptoms, and prescribe some medicine that would kill the disease, not simply make the patient stop coughing.
In this case, my self-appointed Mentor, I diagnosed that the poster had virtually no experience with Object-oriented programming, and was trying to work with technology that he was almost completely unfamiliar with. How did I diagnose this? Well, I read between the lines. Wish I could explain the technique to you, but it requires some abstract thought to comprehend.
I could have given him some cough syrup and sent him on his merry way. My conscience wouldn't allow me to do that. So, I risked your wrath, and the wrath of all the other self-appointed judges out there, and told him what he needed to hear, not necessarily what he wanted to hear. Sue me.
BTW, how much did your post help him? Or did you just want to be recognized as a beacon of compassion in a coldly logical world?
Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "Matt Berther" <mb******@hotmail.com> wrote in message news:22***************************@news.microsoft. com...
Hello Kevin,
And this response helped how?
In the time that it takes to come off with an answer like this, why not construct an answer that may remotely help the original poster?
-- Matt Berther http://www.mattberther.com > Well, you've got 2 choices: > > 1. Use ASP (looks like what you're used to) > 2. Learn ASP.Net's Object-oriented programming model. > Kevin Spencer > Microsoft MVP > .Net Developer > What You Seek Is What You Get. > "EMW" <so*****@MikroZoft.com> wrote in message > news:42**********************@dreader2.news.tiscal i.nl... >> Hi, >> >> When I use >> Response.Write "something" >> it is placed at the top op de html document above the <HTML> tag. >> I need it to be put in the BODY part. >> How can I do this? >> rg, >> Eric
YES!!!
got it working.
The stuff I wanted to put in is now where it should be.
Thanks for the help, Tom!
rg,
Eric
<St************@gmail.com> schreef in bericht
news:11*********************@g14g2000cwa.googlegro ups.com... Tom wilson wrote: This might make more sense and this is what I do.
Create a new aspx page and at the top put a PlaceHolder control. Call it something like PH1. Next, you need to append your page content to the pageholder. So lets say the first thing on the page is a heading: Dim T1 as New LiteralControl T1.Text = "<FONT Face = ""Arial"">This is my heading</FONT>" T1.ID = "T1" ' Optional PH1.Controls.Add(T1)
Dim B1 as new Button B1.Text = "Submit" B1.ID = SomeVal PH1.Controls.Add(B1)
When this page is loaded you'll get a heading and a button below it. For more complex pages with tables an so on I typically define
strings like:
TableStart as String = "<TABLE><TR><TD>" MyContent as String = "<DIV Align=Center>My Content!</DIV>" TableEnd as String = "</TD></TR></TABLE>"
I then define 3 LiteralControl's, assign the text to them and add them in order to the placeholder. I found this method much more flexible for inserting error texts into the page (actually into the placeholder order). I use response.write only for temporary debugging messsages. You can also visually design a skeleton of your page and put placeholders where you want dynamic content to appear. I recently did an entire aspx page of nothing but dynamically created controls and content. It works very well.
Tom, this answer helped me a lot. Just like the original poster, I did not know how to write dynamic content to the page. Thanks!
-Steve
He was referring to me. I got the literalcontrol method from another
helpful developer and it works very well. I don't have time to sift
though MS's 300,000 line 'simple' examples to find the most
complicated method of doing things.
I find far more flexibility to define my table segments as literals
than to use MS's table control. For the same reason I don't bind my
controls directly to data sources. Too many restrictions and too much
work to get around them. I mostly create my page frameworks in design
view and stick placeholders in where I need dynamic content and append
controls and data from there.
Use whichever method you prefer. A MS table control works great for
simple stuff. Play around with placeholders and adding controls,
you'll get the picture right away. If it were me I'd either add the
map definitions in design view or add them as literals before the end
body tag. But that's me. :) I do what works.
Tom
On Wed, 30 Mar 2005 15:50:30 +0200, "EMW" <so*****@MikroZoft.com>
wrote: I moved from nothing (with a little knowledge of html and still growing experience of vb.net) to ASP.NET.
"Scott Simons" <Scott.Simons.At.MealMagic.Com.Remove.This> schreef in bericht news:91**********************************@microsof t.com... Why would you use a literal control for this? Wouldn't a better solution be to an HtmlTable and add that to the place holder. Creating strings for your html really reeks of someone who moved up to asp .net from asp and still doesn't know what they're doing.
EMW: Sorry if that came across as rude to you. We were all beginners once
and I try to not berate beginners. What really irritates me is when people
suggest the wrong answers.
Tom: You have a bad case of NIH (not invented here) syndrome. I used to do
the same stuff you are doing. I looked at some of your posts and noticed
that you are having problems with a lot stuff that is fixed if you use
microsoft's controls. Take the time to learn all of the framework and what
it's capable of and you will end up with much cleaner code with fewer errors.
">Tom: You have a bad case of NIH (not invented here) syndrome."
I don't understand what that means.
" I used to do the same stuff you are doing. I looked at some of your posts and noticed that you are having problems with a lot stuff that is fixed if you use microsoft's controls."
I rarely use Microsoft's controls because they are inflexible. I use
Infragistics controls wherever possible. I find Microsoft's methods
for doing anything over-complicated and bloated. i.e. I needed to
find out how to return a recordID from a SQL server. Just that. MS's
example is 3 PAGES of code. My end solution was 2 LINES. My solution
is "wrong" apparently. Yet it works and I don't require a stored
procedure for every last table, hundreds of them in some cases.
"Take the time to learn all of the framework and what
it's capable of and you will end up with much cleaner code with fewer
errors."
Some of us work all day for a living. I haven't quite finished the
'duplicate person' project yet.
"What really irritates me is when people suggest the wrong answers."
My suggestion, of using LiteralControls is "wrong"? Why is it wrong
when it works? If I write data classes that retrieve and manipulate
data instead of binding controls directly to a datasource, why is that
"wrong" when it works perfectly?
EMW, ignore me. Sorry to waste your time. Here, apparently, is the
real, complete solution:
"Use a table"
*smacks forehead*
Sorry Scott, I get this all too often. I get either "you're doing it
wrong" with no explanation or suggestions or no response at all, like
the last question I asked about resource manifests. Nobody knows what
a resource manifest is but everything I'm doing is definitely wrong.
Welp, I'm going back to writing working, efficient applications and be
proud of it because that's what I've been doing for 27 years. Hearing
everything I'm doing is 'wrong' when it all works is insulting.
Tom
On Wed, 30 Mar 2005 07:59:02 -0800, Scott Simons
<Scott.Simons.At.MealMagic.Com.Remove.This> wrote:
EMW: Sorry if that came across as rude to you. We were all beginners once and I try to not berate beginners. What really irritates me is when people suggest the wrong answers.
Tom: You have a bad case of NIH (not invented here) syndrome. I used to do the same stuff you are doing. I looked at some of your posts and noticed that you are having problems with a lot stuff that is fixed if you use microsoft's controls. Take the time to learn all of the framework and what it's capable of and you will end up with much cleaner code with fewer errors.
Tom,
I won't ignore you, because your suggestion worked great for me and I'm
happy to have using it.
Thanks again for helping!
rg,
Eric.
"Tom wilson" <ye*******@nospam.com> schreef in bericht
news:jt********************************@4ax.com... ">Tom: You have a bad case of NIH (not invented here) syndrome."
I don't understand what that means.
" I used to dothe same stuff you are doing. I looked at some of your posts and noticed that you are having problems with a lot stuff that is fixed if you use microsoft's controls."
I rarely use Microsoft's controls because they are inflexible. I use Infragistics controls wherever possible. I find Microsoft's methods for doing anything over-complicated and bloated. i.e. I needed to find out how to return a recordID from a SQL server. Just that. MS's example is 3 PAGES of code. My end solution was 2 LINES. My solution is "wrong" apparently. Yet it works and I don't require a stored procedure for every last table, hundreds of them in some cases.
"Take the time to learn all of the framework and what it's capable of and you will end up with much cleaner code with fewer errors."
Some of us work all day for a living. I haven't quite finished the 'duplicate person' project yet.
"What really irritates me is when people suggest the wrong answers."
My suggestion, of using LiteralControls is "wrong"? Why is it wrong when it works? If I write data classes that retrieve and manipulate data instead of binding controls directly to a datasource, why is that "wrong" when it works perfectly?
EMW, ignore me. Sorry to waste your time. Here, apparently, is the real, complete solution:
"Use a table"
*smacks forehead*
Sorry Scott, I get this all too often. I get either "you're doing it wrong" with no explanation or suggestions or no response at all, like the last question I asked about resource manifests. Nobody knows what a resource manifest is but everything I'm doing is definitely wrong. Welp, I'm going back to writing working, efficient applications and be proud of it because that's what I've been doing for 27 years. Hearing everything I'm doing is 'wrong' when it all works is insulting.
Tom On Wed, 30 Mar 2005 07:59:02 -0800, Scott Simons <Scott.Simons.At.MealMagic.Com.Remove.This> wrote:
EMW: Sorry if that came across as rude to you. We were all beginners once and I try to not berate beginners. What really irritates me is when people suggest the wrong answers.
Tom: You have a bad case of NIH (not invented here) syndrome. I used to do the same stuff you are doing. I looked at some of your posts and noticed that you are having problems with a lot stuff that is fixed if you use microsoft's controls. Take the time to learn all of the framework and what it's capable of and you will end up with much cleaner code with fewer errors. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Colin Colin |
last post by:
I have an ASP program that is getting an error. When I get the error I
get Page Cannot Be Displayed along with the line that causes the error
and what the error is. What I am not getting is any...
|
by: TinyTim |
last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side
code and you're going to return a customized HTML form with several
fields and labels, you have to do an extensive amount of...
|
by: Eitan |
last post by:
Hello,
How can I write a line (with carriage return + line feed) to the client ?
response.write("abcd"), continue the last line, and doesn't put cr+lf.
response.writeLn is illegal syntax...
...
|
by: Mark |
last post by:
Hi...
I've come across some weird bug with Response.Cookies. Or maybe it will be
called "by design" but for the life of me I can't figure out what purpose it
would serve. If you're setting a...
|
by: dotnettester |
last post by:
Woud this work?
.....
Response.end
set objConn = nothing
set objAnyObject = nothing
?
|
by: Anne |
last post by:
hie there, i want to be able to pass multiple parameters
to another page. currently, i am able to do so, but
somehow i feel it is not the correct way to do it. below
is part of what i have so far....
|
by: Luiz Vianna |
last post by:
Guys,
I need to send some info to my client while I'm processing some stuff. The flow will be something like :
-process
-response
-process
-response
....
I imagine to use response.flush...
|
by: Russ |
last post by:
My web app writes some binary data to a file at the client site via
Response.Write and Response.BinaryWrite. This action is accomplished
in response to a button click, with C# code behind as...
|
by: Shapiro |
last post by:
I have a scenario where I log a resquest to a database table and update the
request with a corresponding response including the response time. I am using
an HttpModule to do this.
My challenge...
|
by: Terry Olsen |
last post by:
Is there any way to make response.write NOT be the first thing on the
page? I have a page with the title and a sub title (not labels or
anything, just typed into the designer). I want the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |