Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Splitting up long asp.net page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eggie5 - 07 Jul 2007 06:38 GMT
So, my asp.net page is getting pretty long and hard to manager. It's
reached 1000 lines and i would like to break it up somehow.

Is there some way I can  make separate parts of my pages to
separate .aspx pages and have asp.net stitch them back-together at
runtime? PHP's include does something link this.

Any ideas?
Amarjyoti31@gmail.com - 07 Jul 2007 06:55 GMT
> So, my asp.net page is getting pretty long and hard to manager. It's
> reached 1000 lines and i would like to break it up somehow.
[quoted text clipped - 4 lines]
>
> Any ideas?

NO DEAR!!!
Masudur - 07 Jul 2007 07:02 GMT
On Jul 7, 11:55 am, Amarjyot...@gmail.com wrote:

> > So, my asp.net page is getting pretty long and hard to manager. It's
> > reached 1000 lines and i would like to break it up somehow.
[quoted text clipped - 6 lines]
>
> NO DEAR!!!

Hi...

Google Reader is managing long page quite well...
they did used ajax and very smart way to show data...
as the user scrolldown google reader populate rest of the page using
ajax...

if you have too large page... why dont you make the content split in
seperate potion..
and use multiview to show the content porstion by portion...

you perhaps you can use ajax...

but please do check out the google reader first...

Thanks
Munna
www.kaz.com.bd
http://munnacs.110mb.com
eggie5 - 07 Jul 2007 07:32 GMT
> On Jul 7, 11:55 am, Amarjyot...@gmail.com wrote:
>
[quoted text clipped - 13 lines]
> Google Reader is managing long page quite well...
> they did used ajax and very smart way to show data...
I'm talking about the html, not the rendered page in the browser.

> as the user scrolldown google reader populate rest of the page using
> ajax...
[quoted text clipped - 9 lines]
> Thanks
> Munnawww.kaz.com.bdhttp://munnacs.110mb.com
Mark Rae [MVP] - 07 Jul 2007 09:39 GMT
> So, my asp.net page is getting pretty long and hard to manager. It's
> reached 1000 lines and i would like to break it up somehow.
>
> Is there some way I can  make separate parts of my pages to
> separate .aspx pages and have asp.net stitch them back-together at
> runtime? PHP's include does something link this.

You might do better to ask yourself *why* your page is getting so long that
you're finding it so hard to manage...

Are you trying to cram too much information on the page? Maybe you should be
thinking about a redesign which will break this page up into two or more
other pages to make it easier for you to manage and to avoid bombarding your
browsers with information overload...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

eggie5 - 08 Jul 2007 01:58 GMT
> > So, my asp.net page is getting pretty long and hard to manager. It's
> > reached 1000 lines and i would like to break it up somehow.
>
> > Is there some way I can  make separate parts of my pages to
> > separate .aspx pages and have asp.net stitch them back-together at
No it's not that. I just need suggestions on how to segment out pieces
of my page to different file and then have asp.net stitch it back
together at runtime. Like how PHPs include works.

> > runtime? PHP's include does something link this.
>
[quoted text clipped - 9 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Mark Rae [MVP] - 08 Jul 2007 10:49 GMT
> No it's not that. I just need suggestions on how to segment out pieces
> of my page to different file and then have asp.net stitch it back
> together at runtime. Like how PHPs include works.

You've already received a suggestion to use UserControls, which would
function in a very similar way to includes...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Bob Johnson - 08 Jul 2007 23:58 GMT
RE:
<<  I just need suggestions on how to segment out pieces of my page to
different file and then have asp.net stitch it back together at runtime.
Like how PHPs include works >>

ASP.NET just doesn't offer the same thing as PHP includes, which are similar
to SSIs in classic ASP.

If you want to break it up as you are intending, then you'll have to write
some code to do it. Others in this thread have pointed out the building
blocks you'd use (user controls) and there are other ways (you could
position Literal controls and then inject a string containing the HTML you
want; with that string being populated by code you write that reads from a
file on disk. This would, basically, give you something very similar to the
includes you are looking for. You'd just have to roll your own.

-HTH
John Saunders [MVP] - 09 Jul 2007 00:14 GMT
> RE:
> <<  I just need suggestions on how to segment out pieces of my page to
[quoted text clipped - 11 lines]
> file on disk. This would, basically, give you something very similar to
> the includes you are looking for. You'd just have to roll your own.

Bob, for the rest of us, what are the differences between User Controls and
PHP includes? I've used User Controls to replace SSI includes, which you say
are similar to PHP includes.
Signature

John Saunders [MVP]

Bob Johnson - 09 Jul 2007 08:13 GMT
Hi John,

RE:
<< which you say are similar to PHP includes>>
Hummm, I thought I said they weren't the same thing and then pointed the OP
to user controls or Literals populated from code-behind.... Maybe I
shouldn't have said he would "have to write code..."

>> RE:
>> <<  I just need suggestions on how to segment out pieces of my page to
[quoted text clipped - 16 lines]
> and PHP includes? I've used User Controls to replace SSI includes, which
> you say are similar to PHP includes.
John Saunders [MVP] - 09 Jul 2007 14:59 GMT
Bob, I think I must have replied to the wrong post (or else I replied while
half-asleep).

Signature

John Saunders [MVP]

> Hi John,
>
[quoted text clipped - 24 lines]
>> and PHP includes? I've used User Controls to replace SSI includes, which
>> you say are similar to PHP includes.
Riki - 07 Jul 2007 09:57 GMT
> So, my asp.net page is getting pretty long and hard to manager. It's
> reached 1000 lines and i would like to break it up somehow.
[quoted text clipped - 4 lines]
>
> Any ideas?

You may consider creating user controls for those parts
of your page that form an entity.

User controls are the equivalent of includes.

Signature

Riki

David R. Longnecker - 07 Jul 2007 16:59 GMT
Do you mean the .ASPX presentation side or the code-behind?  

If it's presentation side, such as tables, controls, etc... consider reviewing
your code to find duplications in effort--where you do the same thing over
and over again (such as tables) and create a custom control that you can
pass data or parameters.  If you have common controls, such as headers and
such, these are also good candidates for custom controls.  Controls are somewhat
similar to an legacy ASP #include or PHP's include--reusable code, but better.
:)

If your actual code-behind is growing quite large, determine if you can separate
it out into other class files and reference these file in your code-behind.

A good place to start, if user control match what you're looking for, is
Google.  Or, experimenting on your own--create a new custom control put some
HTML in it, such as <h1>Hello, world!</h1> and drag it onto your existing
web form.  When it renders, you'll see your text.

HTH.

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

> So, my asp.net page is getting pretty long and hard to manager. It's
> reached 1000 lines and i would like to break it up somehow.
[quoted text clipped - 4 lines]
>
> Any ideas?
Rad [Visual C# MVP] - 08 Jul 2007 12:01 GMT
>So, my asp.net page is getting pretty long and hard to manager. It's
>reached 1000 lines and i would like to break it up somehow.
[quoted text clipped - 4 lines]
>
>Any ideas?

User controls are your friends. Especially used in conjunction with
caching ...

--
http://bytes.thinkersroom.com

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.