Showing posts with label content. Show all posts
Showing posts with label content. Show all posts

Thursday, March 29, 2012

html forms within the server generated form tag

Ok, I'm using an XSL to generate the content div of a page. I'm using
http://script.aculo.us to do some asynch posting and getting so that I don't
actually have to have the server know what I've generated. The whole idea is
that the content is organic. That part is working. Except for one strange
thing... I'm not sure if this is an ASP.net thing, or something I just don't
know about the DOM. When I add sub-forms with just plain html form tags,
the first child form I add isn't recognized as a separate form. It's
contents are 'added' to the main form. I've worked around it by putting a
dummy do nothing form on the page in front of my other generated sub forms...
but what gives here? I know it's not my markup because if I reverse the
order of the generated forms, the FIRST sub-form on the page is always
'assimilated' in the aspNetform, I've tried everything to get this not to
happen, enclosing in divs, and even just making a page with nothing but
generated forms... same results every time. The first html form on the page
is ALWAYS added to the asp.net generated form, no matter what. Am I missing
something? (I find that every time I post here, I usually am)

html forms within the server generated form tag

Ok, I'm using an XSL to generate the content div of a page. I'm using
http://script.aculo.us to do some asynch posting and getting so that I don't
actually have to have the server know what I've generated. The whole idea i
s
that the content is organic. That part is working. Except for one strange
thing... I'm not sure if this is an ASP.net thing, or something I just don't
know about the DOM. When I add sub-forms with just plain html form tags,
the first child form I add isn't recognized as a separate form. It's
contents are 'added' to the main form. I've worked around it by putting a
dummy do nothing form on the page in front of my other generated sub forms..
.
but what gives here? I know it's not my markup because if I reverse the
order of the generated forms, the FIRST sub-form on the page is always
'assimilated' in the aspNetform, I've tried everything to get this not to
happen, enclosing in divs, and even just making a page with nothing but
generated forms... same results every time. The first html form on the page
is ALWAYS added to the asp.net generated form, no matter what. Am I missing
something? (I find that every time I post here, I usually am)

Monday, March 26, 2012

HTML Files from IE

Hi:
Why i cannot see the content of a HTML file, when i open it directly from
IE, it shows "canceled action"Hi Laurahn,
What HTML file is it? Does it it contain script? By default, IE will block
script executing if the file is opened locally.
Please post the html file or some of its code here so that we can help
further. Thanks.
By the way, not sure if it applies but if you're using <script> block in
the html file, remember IE doesn't support <script />, you must use
<script></script>.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Laurahn,
If you see this, would you please reply here to let me know the status of
this post? Thanks.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

HTML Files from IE

Hi:
Why i cannot see the content of a HTML file, when i open it directly from
IE, it shows "canceled action"Hi Laurahn,

What HTML file is it? Does it it contain script? By default, IE will block
script executing if the file is opened locally.

Please post the html file or some of its code here so that we can help
further. Thanks.

By the way, not sure if it applies but if you're using <scriptblock in
the html file, remember IE doesn't support <script />, you must use
<script></script>.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Laurahn,

If you see this, would you please reply here to let me know the status of
this post? Thanks.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Thursday, March 22, 2012

HTML control-LABEL

I have several HTML controls -- "Label" in the page. They are used to show some names and content of the page. I want to be able to change the text of these Labels at the run time. Is it possible? I don't see any property of the Label allow me to change the text of the Label. Only at the design time, I can click on the Label to change the text of the Label, I am wondering if I am on the right track Since the design is from the previous graphic designer, I try not to change the type of control. If Label is the wrong choice, what other controls have the similar features to suite my purpose? Thanks.

Chia

Have you tried label.text ?

try declaring the labels as global variables, like so:

ProtectedWithEvents idOfYourLabelAs System.Web.UI.WebControls.Label

then set the text property of the label:

idOfYourLabel.Text = "Your text goes here"


If I use Web control, I have no problem to change the text by doing

Label.text = name;

But, I am using HTML control. There is no such property for me to modify the text.

Thanks,

Chia


Is there any reason that you are not using the label web control ?

What you have to remember is that any procedures that you define in an ASP.Net page are executed server-side. And, when you want to manipulate a control via server-side code, you need to define the tag with an id and a runat="server" statement.

You can try doing this with your html label tag, I'm not sure if it will work though.

Let us know what happens.

Cheers

Martin


Use theInnerTextproperty of the html control.

It works. By using property "InnerText", I can change the text at the run time for HTML control -- Label.

Like I mentioned earlier, the graphic designer was using lots of HTML control -- Label to format and design the screen. I am just trying not to make too much changes of the page format. Also, I am not sure if he has good reason to use HTML control -- Label here.

Chia

html content pageing in .net page

hi...
i have a problem and i'm not find in web this problem.
problem: text data recorded in database and this text data content HTML. iwant to pageing this textdata in page. i try count to character but tobe HTML tag in text data... i hope understand me.

Hi. You can try using

Server.HtmlEncode("<b>Your HTML Content Here</b>")


no no i'm not find this. i write problem again : example have a text (3000 character) and i do paging this text. example every page 1000 character... total 3 page. or text = 5000 character every page 1000 character total page = 5 as soon as... this application same datagrip paging ... BUT existent HTML TAGS in text... anyway problem this HTML TAGS...

already now thanks...

HTML Content Editor

I'm looking to develop a simple content editor as part of an web-based
cms system. It needs to be able to handle tables and graphics in a
non-technical way.

The best I've seen is at http://www.crossbowweb.net/Demo/

Can anyone tell me how I can develop something like this in asp.net?

John South
Pangbourne UKThe short answer from one who's been there is not easily but take a look at
msdn if you're sure that your users will use IE - do a search on 'html
editor' and you'll find some interesting stuff.

Joe

"John South" <jsouth@.cix.co.uk> wrote in message
news:d2aa22df.0312170113.5f9bb07e@.posting.google.c om...
> I'm looking to develop a simple content editor as part of an web-based
> cms system. It needs to be able to handle tables and graphics in a
> non-technical way.
> The best I've seen is at http://www.crossbowweb.net/Demo/
> Can anyone tell me how I can develop something like this in asp.net?
> John South
> Pangbourne UK

Wednesday, March 21, 2012

HTML 2 ASP.NET ?

hi,
i have theese static html pages
what is the best way to replace the content w/ .NET dynamic data w/o
loosing all the formating?
I have VS.NET, but will prefer to write the aspx code w/o designer.
Is there some straight way to replace say every HTML form w/ an
ASP one?
TIA"Bruce" <no@.spam.com> wrote in message
news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...

> i have theese static html pages
> what is the best way to replace the content w/ .NET dynamic data w/o
> loosing all the formating?
> I have VS.NET, but will prefer to write the aspx code w/o designer.
> Is there some straight way to replace say every HTML form w/ an
> ASP one?
Are you wanting to replace them because you need to turn their static
content into dynamic content? If not, then just leave them the way they
are...
yeap, i need dynamic data from a database
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
> "Bruce" <no@.spam.com> wrote in message
> news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>
> Are you wanting to replace them because you need to turn their static
> content into dynamic content? If not, then just leave them the way they
> are...
>
I'm not sure I clearly understand what you want, but I'll give this a
stab. You are talking about HTML forms into ASP forms and I don't think
this is directly doable (I could be wrong). The reason being is ASP.NET
wouldn't be able to address the Control heirarchy and persist ViewState
for you. It would simply render out the "html" with no server side
abilities.
If you are simply talking about text content and not HTML form elements,
then this is a simple matter of cut & paste into a SQL table with a
little development of a control to grab the data.
Clint Hill
H3O Software
http://www.h3osoftware.com
Bruce wrote:
> yeap, i need dynamic data from a database
> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>
>
>
"Bruce" <no@.spam.com> wrote in message
news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...

> yeap, i need dynamic data from a database
In which case, you'll pretty much need to create the ASPX pages from
scratch. But, any formatting that's possible in raw HTML is perfectly
possible in ASP.NET.
> i have theese static html pages
> what is the best way to replace the content w/ .NET dynamic data w/o
> loosing all the formating?
Write an asp.net application that pulls the data out of the database and
formats the content the same was as your current HTML page is formatted.
There's no 'automated' way to do what you are asking.
-Darrel
The problem is i am not any good at HTML, the pages are already written by a
profecinal
designer, updates are now done manually :( and i heard VS.NET designer
produces very messy markup.
Do u know of some table listing ASP.NET server componets similar to the
different HTML
interface elements or some conversion software?
"Bruce" <no@.spam.com> wrote in message
news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...
> yeap, i need dynamic data from a database
> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>
> The problem is i am not any good at HTML, the pages are already written by
a
> profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to the
> different HTML
> interface elements or some conversion software?
ASP.net's default controls are pretty bad when it comes to producing clean,
semantic, standards compliant markup.
Plus, you still have the issue of formatting the specific content on your
page.
You really need to do this with some custom programing. There really isn't
any way around this.
-Darrel
"Bruce" <no@.spam.com> wrote in
news:#TT$TrpoFHA.1872@.TK2MSFTNGP10.phx.gbl:

> The problem is i am not any good at HTML, the pages are already
> written by a profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to
> the different HTML
> interface elements or some conversion software?
>
No such software. Use the HTML as a template and add dynamic controls to
the page - replacing the static text. That is probably your easiest
solution.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
:(
u could at least say "wait for ASP.NET 3.0" ^_^
ok, say i have an HTML label, how do i write an ASP label
that rendres w/ the same size, color and triggers the same
JavaScript functions?
"Bruce" <no@.spam.com> wrote in message
news:%23TT$TrpoFHA.1872@.TK2MSFTNGP10.phx.gbl...
> The problem is i am not any good at HTML, the pages are already written by
> a profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to the
> different HTML
> interface elements or some conversion software?
> "Bruce" <no@.spam.com> wrote in message
> news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...
>

HTML 2 ASP.NET ?

hi,
i have theese static html pages
what is the best way to replace the content w/ .NET dynamic data w/o
loosing all the formating?
I have VS.NET, but will prefer to write the aspx code w/o designer.
Is there some straight way to replace say every HTML form w/ an
ASP one?

TIA"Bruce" <no@.spam.com> wrote in message
news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...

> i have theese static html pages
> what is the best way to replace the content w/ .NET dynamic data w/o
> loosing all the formating?
> I have VS.NET, but will prefer to write the aspx code w/o designer.
> Is there some straight way to replace say every HTML form w/ an
> ASP one?

Are you wanting to replace them because you need to turn their static
content into dynamic content? If not, then just leave them the way they
are...
yeap, i need dynamic data from a database

"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
> "Bruce" <no@.spam.com> wrote in message
> news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>> i have theese static html pages
>> what is the best way to replace the content w/ .NET dynamic data w/o
>> loosing all the formating?
>> I have VS.NET, but will prefer to write the aspx code w/o designer.
>> Is there some straight way to replace say every HTML form w/ an
>> ASP one?
> Are you wanting to replace them because you need to turn their static
> content into dynamic content? If not, then just leave them the way they
> are...
I'm not sure I clearly understand what you want, but I'll give this a
stab. You are talking about HTML forms into ASP forms and I don't think
this is directly doable (I could be wrong). The reason being is ASP.NET
wouldn't be able to address the Control heirarchy and persist ViewState
for you. It would simply render out the "html" with no server side
abilities.

If you are simply talking about text content and not HTML form elements,
then this is a simple matter of cut & paste into a SQL table with a
little development of a control to grab the data.

Clint Hill
H3O Software
http://www.h3osoftware.com

Bruce wrote:
> yeap, i need dynamic data from a database
> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>>"Bruce" <no@.spam.com> wrote in message
>>news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>>
>>
>>>i have theese static html pages
>>>what is the best way to replace the content w/ .NET dynamic data w/o
>>>loosing all the formating?
>>>I have VS.NET, but will prefer to write the aspx code w/o designer.
>>>Is there some straight way to replace say every HTML form w/ an
>>>ASP one?
>>
>>Are you wanting to replace them because you need to turn their static
>>content into dynamic content? If not, then just leave them the way they
>>are...
>>
>
"Bruce" <no@.spam.com> wrote in message
news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...

> yeap, i need dynamic data from a database

In which case, you'll pretty much need to create the ASPX pages from
scratch. But, any formatting that's possible in raw HTML is perfectly
possible in ASP.NET.
> i have theese static html pages
> what is the best way to replace the content w/ .NET dynamic data w/o
> loosing all the formating?

Write an asp.net application that pulls the data out of the database and
formats the content the same was as your current HTML page is formatted.

There's no 'automated' way to do what you are asking.

-Darrel
The problem is i am not any good at HTML, the pages are already written by a
profecinal
designer, updates are now done manually :( and i heard VS.NET designer
produces very messy markup.
Do u know of some table listing ASP.NET server componets similar to the
different HTML
interface elements or some conversion software?

"Bruce" <no@.spam.com> wrote in message
news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...
> yeap, i need dynamic data from a database
> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>> "Bruce" <no@.spam.com> wrote in message
>> news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>>
>>> i have theese static html pages
>>> what is the best way to replace the content w/ .NET dynamic data w/o
>>> loosing all the formating?
>>> I have VS.NET, but will prefer to write the aspx code w/o designer.
>>> Is there some straight way to replace say every HTML form w/ an
>>> ASP one?
>>
>> Are you wanting to replace them because you need to turn their static
>> content into dynamic content? If not, then just leave them the way they
>> are...
>>
> The problem is i am not any good at HTML, the pages are already written by
a
> profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to the
> different HTML
> interface elements or some conversion software?

ASP.net's default controls are pretty bad when it comes to producing clean,
semantic, standards compliant markup.

Plus, you still have the issue of formatting the specific content on your
page.

You really need to do this with some custom programing. There really isn't
any way around this.

-Darrel
"Bruce" <no@.spam.com> wrote in
news:#TT$TrpoFHA.1872@.TK2MSFTNGP10.phx.gbl:

> The problem is i am not any good at HTML, the pages are already
> written by a profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to
> the different HTML
> interface elements or some conversion software?

No such software. Use the HTML as a template and add dynamic controls to
the page - replacing the static text. That is probably your easiest
solution.

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
:(
u could at least say "wait for ASP.NET 3.0" ^_^
ok, say i have an HTML label, how do i write an ASP label
that rendres w/ the same size, color and triggers the same
JavaScript functions?

"Bruce" <no@.spam.com> wrote in message
news:%23TT$TrpoFHA.1872@.TK2MSFTNGP10.phx.gbl...
> The problem is i am not any good at HTML, the pages are already written by
> a profecinal
> designer, updates are now done manually :( and i heard VS.NET designer
> produces very messy markup.
> Do u know of some table listing ASP.NET server componets similar to the
> different HTML
> interface elements or some conversion software?
> "Bruce" <no@.spam.com> wrote in message
> news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...
>> yeap, i need dynamic data from a database
>>
>> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
>> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>>> "Bruce" <no@.spam.com> wrote in message
>>> news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>>>
>>>> i have theese static html pages
>>>> what is the best way to replace the content w/ .NET dynamic data w/o
>>>> loosing all the formating?
>>>> I have VS.NET, but will prefer to write the aspx code w/o designer.
>>>> Is there some straight way to replace say every HTML form w/ an
>>>> ASP one?
>>>
>>> Are you wanting to replace them because you need to turn their static
>>> content into dynamic content? If not, then just leave them the way they
>>> are...
>>>
>>
>>
If you're looking for some kind of uber-basic content management solution --
say, to allow non-technical users to update defined parts of a webpage --
you could look at some off-the-shelf product like Macromedia Contribute. It
would be easier than setting up a code-based solution, which is what you're
asking here.

If you don't know how to code, there isn't a quick and painless way to do
what you wanna do.

-KF

"Bruce" <no@.spam.com> wrote in message
news:OIf2EPsoFHA.3656@.TK2MSFTNGP09.phx.gbl...
> :(
> u could at least say "wait for ASP.NET 3.0" ^_^
> ok, say i have an HTML label, how do i write an ASP label
> that rendres w/ the same size, color and triggers the same
> JavaScript functions?
> "Bruce" <no@.spam.com> wrote in message
> news:%23TT$TrpoFHA.1872@.TK2MSFTNGP10.phx.gbl...
>> The problem is i am not any good at HTML, the pages are already written
>> by a profecinal
>> designer, updates are now done manually :( and i heard VS.NET designer
>> produces very messy markup.
>> Do u know of some table listing ASP.NET server componets similar to the
>> different HTML
>> interface elements or some conversion software?
>>
>> "Bruce" <no@.spam.com> wrote in message
>> news:uf9EagooFHA.1468@.TK2MSFTNGP12.phx.gbl...
>>> yeap, i need dynamic data from a database
>>>
>>> "Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
>>> news:O0s$pXooFHA.2080@.TK2MSFTNGP14.phx.gbl...
>>>> "Bruce" <no@.spam.com> wrote in message
>>>> news:%23N4JZUooFHA.2904@.tk2msftngp13.phx.gbl...
>>>>
>>>>> i have theese static html pages
>>>>> what is the best way to replace the content w/ .NET dynamic data w/o
>>>>> loosing all the formating?
>>>>> I have VS.NET, but will prefer to write the aspx code w/o designer.
>>>>> Is there some straight way to replace say every HTML form w/ an
>>>>> ASP one?
>>>>
>>>> Are you wanting to replace them because you need to turn their static
>>>> content into dynamic content? If not, then just leave them the way they
>>>> are...
>>>>
>>>
>>>
>>
>>
> Do u know of some table listing ASP.NET server componets similar to the
> different HTML interface elements ...?

Converting an html page to an aspx one is not so complicated.

1. Start a new web application project.
2. Add a new web form for every page.
3. For every page copy/paste the html content to the new web form in Html
view.
4. Add runat="server" attribute to those of your existing html controls you
want to make dynamic. You will also need to set the id attribute.
5. For every page switch to the Design view, wait for a few seconds and
switch back to the Html view. Press ctrlZ twice to undo the formatting mess
introduced by the Visual Studio.
6. View code-behind. You will find that the Visual Studio created a server
control for every html control with runat="server".
7. Start programming your pages.

That's about it.

Eliyahu
> u could at least say "wait for ASP.NET 3.0" ^_^
> ok, say i have an HTML label, how do i write an ASP label
> that rendres w/ the same size, color and triggers the same
> JavaScript functions?

Why use an ASP label?

Just use the HTML label and put runat="server" in it. Then you can still put
your inline javascript and CSS if you wish.

-Darrel
tnx a lot

"Eliyahu Goldin" <removemeegoldin@.monarchmed.com> wrote in message
news:O7$2NnwoFHA.3304@.tk2msftngp13.phx.gbl...
>> Do u know of some table listing ASP.NET server componets similar to the
>> different HTML interface elements ...?
> Converting an html page to an aspx one is not so complicated.
> 1. Start a new web application project.
> 2. Add a new web form for every page.
> 3. For every page copy/paste the html content to the new web form in Html
> view.
> 4. Add runat="server" attribute to those of your existing html controls
> you
> want to make dynamic. You will also need to set the id attribute.
> 5. For every page switch to the Design view, wait for a few seconds and
> switch back to the Html view. Press ctrlZ twice to undo the formatting
> mess
> introduced by the Visual Studio.
> 6. View code-behind. You will find that the Visual Studio created a server
> control for every html control with runat="server".
> 7. Start programming your pages.
> That's about it.
> Eliyahu
tnx

"darrel" <notreal@.hotmail.com> wrote in message
news:O4puYO1oFHA.764@.TK2MSFTNGP14.phx.gbl...
>> u could at least say "wait for ASP.NET 3.0" ^_^
>> ok, say i have an HTML label, how do i write an ASP label
>> that rendres w/ the same size, color and triggers the same
>> JavaScript functions?
> Why use an ASP label?
> Just use the HTML label and put runat="server" in it. Then you can still
> put
> your inline javascript and CSS if you wish.
> -Darrel