For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > July 2004 > Copying a web form within a project









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Copying a web form within a project
Eric

2004-07-30, 3:58 pm

Couple of general webform questions. Most are about html code
created/managed by the editor. I work in GridLayout Mode.

1. Is there a reference or guideline for how the html should appear
when viewing a web form in HTML format, after you've added elements in
design view? Can I change they way they are formatted for viewing?

2. What's the easist way to clone a webform while inside a project. I
don't want to inherit from it, I just want a new copy of it with a
different name in the current project. See #3 below for the wrong way
to do it.

3. I created a new web form. I then selected all the elements on an
existing web form and then copied and pasted them to the new web form.
Now I cannot draw a box around the elements on the new form to select
them. I have to select them manually. The form works and compiles, but
it's very unstable in the development environment.

Also when I copy and past an element it appears in the upper right
hand corner. It's html appears outside of the form tag so if I try to
recompile, I get a message telling me the new element needs to be
inside of the form. Looking at the html, the element has been added to
the very bottom of the html, outside of the </form> closing tag.

I've also got a <DIV> tag on the suspect form too that appeared out of
nowhere. Can anyone explain how that got there. I think he's the cause
of my problems (from the cut and paste from the source form).

Thanks in advance.
Eric
John Saunders

2004-07-30, 3:58 pm

Answers inline:

"Eric" <epaetz41@hotmail.com> wrote in message
news:bff806e9.0407300643.1b50489b@posting.google.com...
> Couple of general webform questions. Most are about html code
> created/managed by the editor. I work in GridLayout Mode.


Sorry, I never use Grid Layout. I think that some of your problems are due
to grid layout, so I won't be able to answer those.

> 1. Is there a reference or guideline for how the html should appear
> when viewing a web form in HTML format, after you've added elements in
> design view? Can I change they way they are formatted for viewing?


It's just a readability issue, so of course, there's at least one standard
per reader. :-) You have some control over the formatting by using the
options under Tools->Options->Text Editor->HTML/XML. The formatting options
have become much richer under VS 2005 (beta).

> 2. What's the easist way to clone a webform while inside a project. I
> don't want to inherit from it, I just want a new copy of it with a
> different name in the current project. See #3 below for the wrong way
> to do it.


In the solution explorer, right-click the web form and choose Copy. Then
choose the folder you want it to go into and choose Paste.

> 3. I created a new web form. I then selected all the elements on an
> existing web form and then copied and pasted them to the new web form.
> Now I cannot draw a box around the elements on the new form to select
> them. I have to select them manually. The form works and compiles, but
> it's very unstable in the development environment.
>
> Also when I copy and past an element it appears in the upper right
> hand corner. It's html appears outside of the form tag so if I try to
> recompile, I get a message telling me the new element needs to be
> inside of the form. Looking at the html, the element has been added to
> the very bottom of the html, outside of the </form> closing tag.
>
> I've also got a <DIV> tag on the suspect form too that appeared out of
> nowhere. Can anyone explain how that got there. I think he's the cause
> of my problems (from the cut and paste from the source form).


I suspect that all of your problems in #3 are due to grid layout.
--
John Saunders
johnwsaundersiii at hotmail


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com