非常大的页面 - 需要建议 [英] Very large page - Need advice

查看:74
本文介绍了非常大的页面 - 需要建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我必须设计一个包含最多200个问题的测验页面。用户

做的是他们开始测验,转到带问题1的第1页,输入一些答案,

点击第2页跟问题2,依此类推,直到他们到达第100页

然后他们会点击提交按钮提交他们的答案。


我现在的方法是:仅在一个网络表单中,


- 将所有200个问题(或根据要求,可能是20或

200个问题,即问题数量不同)加载到数据集中,


- 然后取决于数据集大小,动态创建相同数量的

面板控件来包含问题和答案的文本框,


- 将面板控件添加到网络表单。


- 然后取决于用户所处的问题,我会显示

相应的面板并隐藏其他面板。


这样我就可以在一个页面中保留所有用户的答案。


但是,自页面以来真是太大了ld长到200个面板),我不是

肯定这是一个很好的方法。


我的问题,这种方法性能是否合适明智的。知道

如何做到这一点。在此先感谢。

Hi all,

I have to design a quiz page which includes up to 200 questions. What users
do is they start the quiz, go to page1 with question1, enter some answers,
click next to go page2 with question2, and so on until they get to page100
then they will hit submit button to submit their answers.

My approach right now is: In one web form only,

- load all 200 questions (or depending on the requirement, could be 20 or
200 questions, ie the number of questions varies) into a dataset,

- then depends on the dataset size, dynamically create the same number of
panel controls to contain the questions and the textboxes for the answers,

- add the panel controls to the web form.

- then depends on the which question the user is at, I''ll show the
corresponding panel and hide the other panels.

That way I can retain all user answers in one page.

However, since the page is so big ( could grow up to 200 panels), I''m not
sure this is a good approach.

My question, is it ok with this approach performance wise. Any idea of how
to do it. Thanks in advance.

推荐答案

嗯......为什么要求用户留在同一页面上?对于用户

体验,或编程方便?


您可以在页面上只显示一个问题,让用户点击

下一步 (这将是一个提交按钮),然后在你的代码隐藏中使用

会话和查看状态来存储他们的答案到目前为止,确定要显示的下一个

问题,以及何时他们已经完成,将所有信息存储到一个

数据库(或其他任何数据库)。


IMO你应该只做你正在做的事情有一个原因,用户

不应该刷新页面...也许你的用户不介意初始等待

但讨厌页面重新加载。


-

Ben Strackany
www.developmentnow.com

< a href =" http://www.developmentnow.com"> dn< / a>

" hn" < hn@discussions.microsoft.com>在消息中写道

news:44 ********************************** @ microsof t.com ...
Hmm...why are you requiring users to stay on the same page? For user
experience, or programming convenience?

You could instead show only one question on the page, have the user click
"Next" (which would be a submit button), then in your codebehind use
sessions and view state to store their answers thus far, determine the next
question to show, and when they''re done, store all the information into a
database (or whatever).

IMO you should only do what you''re doing if there''s a reason why users
shouldn''t refresh the page...maybe your users don''t mind the initial wait
but hate page reloads.

--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>
"hn" <hn@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
大家好,

我必须设计一个包含最多200个问题的测验页面。
用户做的是他们开始测验,转到带有问题1的第1页,输入一些答案,然后点击第2页的问题2,依此类推,直到他们到达page100
然后他们将点击提交按钮提交他们的答案。

我现在的方法是:只在一个网络表单中,

- 加载所有200个问题(或根据要求,可能是20个问题,即200个问题,即问题的数量不同)变成一个数据集,
- 然后取决于数据集的大小,动态创建相同数量的面板控件来包含问题和答案的文本框,

- 将面板控件添加到网络表单。

- 然后取决于用户所处的问题,我是将显示相应的面板并隐藏其他面板。

这样我就可以在一个页面中保留所有用户的答案。

但是,因为页面是这样的大(可以长到200个面板),我不是确定这是一个很好的方法h。

我的问题是,这种方法在性能方面是否合适。知道怎么做
。在此先感谢。
Hi all,

I have to design a quiz page which includes up to 200 questions. What users do is they start the quiz, go to page1 with question1, enter some answers,
click next to go page2 with question2, and so on until they get to page100
then they will hit submit button to submit their answers.

My approach right now is: In one web form only,

- load all 200 questions (or depending on the requirement, could be 20 or
200 questions, ie the number of questions varies) into a dataset,

- then depends on the dataset size, dynamically create the same number of
panel controls to contain the questions and the textboxes for the answers,

- add the panel controls to the web form.

- then depends on the which question the user is at, I''ll show the
corresponding panel and hide the other panels.

That way I can retain all user answers in one page.

However, since the page is so big ( could grow up to 200 panels), I''m not
sure this is a good approach.

My question, is it ok with this approach performance wise. Any idea of how
to do it. Thanks in advance.



从用户角度来看,我很想知道有多少用户会回答

200个问题!


" Ben Strackany" <在******** @ developmentnow.nospam.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP14.phx.gbl ...
From a user point for view, I seriously wonder how many users will answer
200 questions!

"Ben Strackany" <in********@developmentnow.nospam.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
嗯。 ..为什么要求用户留在同一页面上?对于用户体验或编程的便利性?

您可以在页面上只显示一个问题,让用户点击
下一步。 (这将是一个提交按钮),然后在你的代码隐藏中使用
会话和查看状态来存储他们的答案到目前为止,确定要显示的
下一个问题,以及何时完成,存储所有将信息导入数据库(或其他任何数据库)。

IMO你应该只做你正在做的事情,如果有这样的原因,用户不应该刷新页面...也许你的用户不介意最初的等待
但讨厌页面重新加载。

-
Ben Strackany
www.developmentnow.com

< a href =" http:// www .developmentnow.com"> dn< / a>

" hn" < hn@discussions.microsoft.com>在消息中写道
新闻:44 ********************************** @ microsof t.com。 ..
Hmm...why are you requiring users to stay on the same page? For user
experience, or programming convenience?

You could instead show only one question on the page, have the user click
"Next" (which would be a submit button), then in your codebehind use
sessions and view state to store their answers thus far, determine the next question to show, and when they''re done, store all the information into a
database (or whatever).

IMO you should only do what you''re doing if there''s a reason why users
shouldn''t refresh the page...maybe your users don''t mind the initial wait
but hate page reloads.

--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>
"hn" <hn@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
大家好,

我必须设计一个包含多达200个问题的测验页面。什么
Hi all,

I have to design a quiz page which includes up to 200 questions. What


用户

做的是他们开始测验,转到带有问题1的第1页,输入一些
答案,单击下一步转到带有问题2的第2页,依此类推直到他们到达
page100然后他们会点击提交按钮提交他们的答案。

我现在的方法是:仅在一个网络表单中,

- 加载所有200个问题(或根据要求,可能是20美元b $ b或200个问题,即问题数量不同)变成数据集,

- 然后取决于数据集大小,动态创建相同数量的
面板控件包含问题和
答案的文本框,
- 将面板控件添加到Web表单。

- 然后取决于关于用户所处的问题,我将显示
相应的面板并隐藏其他面板。

这样我就可以在一个页面中保留所有用户的答案。

但是,由于页面太大(可以长到200个面板),我'米
不知道这是一个不错的办法。

我的问题,它是确定这种方法的性能明智。任何
的想法怎么做。在此先感谢。
do is they start the quiz, go to page1 with question1, enter some answers, click next to go page2 with question2, and so on until they get to page100 then they will hit submit button to submit their answers.

My approach right now is: In one web form only,

- load all 200 questions (or depending on the requirement, could be 20 or 200 questions, ie the number of questions varies) into a dataset,

- then depends on the dataset size, dynamically create the same number of panel controls to contain the questions and the textboxes for the answers,
- add the panel controls to the web form.

- then depends on the which question the user is at, I''ll show the
corresponding panel and hide the other panels.

That way I can retain all user answers in one page.

However, since the page is so big ( could grow up to 200 panels), I''m not sure this is a good approach.

My question, is it ok with this approach performance wise. Any idea of how to do it. Thanks in advance.




嗨Ben,


一切都在同一页面只是因为编程方便。

由于问题的数量不同,所以我想根据问题的数量动态创建页面

。我不想提前创建200页
页面。但是,是的,我知道这样做并不好。


Ben Strackany写道:
Hi Ben,

Everything is in the same page because of programming convenience only.
Since the number of questions varies, so I want to to create the pages
dynamically depending on the number of questions. I don''t want to create 200
pages ahead. But yeah, I know it''s not good that way.

"Ben Strackany" wrote:
嗯......你为什么要求用户留在同一页面上?对于用户体验或编程的便利性?

您可以在页面上只显示一个问题,让用户点击
下一步。 (这将是一个提交按钮),然后在你的代码隐藏中使用
会话和查看状态来存储他们的答案到目前为止,确定要显示的下一个问题,以及何时完成,存储所有将信息导入数据库(或其他任何数据库)。

IMO你应该只做你正在做的事情,如果有这样的原因,用户不应该刷新页面...也许你的用户不介意最初的等待
但讨厌页面重新加载。

-
Ben Strackany
www.developmentnow.com

< a href =" http:// www .developmentnow.com"> dn< / a>

" hn" < hn@discussions.microsoft.com>在消息中写道
新闻:44 ********************************** @ microsof t.com。 ..
Hmm...why are you requiring users to stay on the same page? For user
experience, or programming convenience?

You could instead show only one question on the page, have the user click
"Next" (which would be a submit button), then in your codebehind use
sessions and view state to store their answers thus far, determine the next
question to show, and when they''re done, store all the information into a
database (or whatever).

IMO you should only do what you''re doing if there''s a reason why users
shouldn''t refresh the page...maybe your users don''t mind the initial wait
but hate page reloads.

--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>
"hn" <hn@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
大家好,

我必须设计一个包含多达200个问题的测验页面。什么
Hi all,

I have to design a quiz page which includes up to 200 questions. What


用户

做的是他们开始测验,转到带有问题1的第1页,输入一些答案,单击旁边的第2页和问题2,依此类推直到他们到达page100
然后他们会点击提交按钮提交他们的答案。

我现在的方法是:只在一个网络表单中,

- 加载所有200个问题(或根据要求,可能是20个问题,或者200个问题,即问题数量不同)变成数据集,
- 然后取决于数据集大小,动态创建用于包含问题的相同数量的面板控件和答案的文本框,

- 将面板控件添加到Web表单。

- 然后取决于关于用户所处的问题,我将显示
相应的面板并隐藏其他面板。

这样我就可以在一个页面中保留所有用户的答案。

但是,由于页面太大(可以长到200个面板),我不是确定这是一个很好的方法。

我的问题是,这种方法表现得好吗?知道怎么做
。提前致谢。
do is they start the quiz, go to page1 with question1, enter some answers,
click next to go page2 with question2, and so on until they get to page100
then they will hit submit button to submit their answers.

My approach right now is: In one web form only,

- load all 200 questions (or depending on the requirement, could be 20 or
200 questions, ie the number of questions varies) into a dataset,

- then depends on the dataset size, dynamically create the same number of
panel controls to contain the questions and the textboxes for the answers,

- add the panel controls to the web form.

- then depends on the which question the user is at, I''ll show the
corresponding panel and hide the other panels.

That way I can retain all user answers in one page.

However, since the page is so big ( could grow up to 200 panels), I''m not
sure this is a good approach.

My question, is it ok with this approach performance wise. Any idea of how
to do it. Thanks in advance.




这篇关于非常大的页面 - 需要建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆