How can I improve my process flow to reduce coding pain?

Y

YesGoGoGo

hello!
I use asp+vb before and new to ASP.NET.
And I have to write a new function with C#
I draw a prototype and the picture is here--- http://0rz.net/af1hy
let me explain this process in detail

User use this function to create a document.
First,he must upload a main file.
When he uploads his file,our component in backend can process this
file(txt or word) and
extract keywords or generate summary for it.
After these operation,keywords and summary will be filled into the
following fields.
User can modify these fields (ex: keywords,title,summary...) and
finally save this document.
Because we will have many kinds of document type in the system
and different document type will have different fields.
(ie.meeting type has "meeting date,participants" fields"
book type has "publisher,ISBN" fields)
So the fields are determined by *Document Type* and it means the fields
are dynamically generated after user choose *Document Type*.

In the prototype,I use different color to show my idea.
I hope in the beginning,user will only see yellow part.
If he wants to change Document Type
he can press "Advance Setting" and the hidden panel will be displayed
on the same screen.
After user uploads the file,green and pink part will be displayed and
those auto extraction info will be filled into the corresponding
fields.

well..maybe because I'm not familliar with ASP.NET and its feature,such
as web control,postback....etc
I think it's really painful to do this processs in ONE page.
Because I have to handle A LOT of postback situation in page_load.
That really kill me >_<~

Can any friends give me some advice to reduce coding pain?
maybe in UI design or manage front-end code...whatever you think about.
Thank you so much!
 
J

Jens Rieck

Hello,

in this case you should use a placeholder for the green area:

<asp:placeholder runat="server" id="keywords" />

For the individual document types, add WebControls (ascx) to your
project and place the required fields in there. These controls
have their own Page_Load event handlers and therefore can save the
data on their own favor.

In the change event for the document type dropdown list, you
can load the appropriate controls on-the-fly:

keywords.Controls.Add( LoadControl( "~/book.ascx" ) );

Hoping this helped you.

Jens Rieck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top