开发者

Using AJAX in webforms (ASP.NET)

on my开发者_运维知识库 webpage the user must select out of a radio button list/dropdown list of types of computer locations - i.e. network share, FTP, HTTP. I want a different popup to come up for each option in the list, and in that popup will be some input fields to enter the network path, FTP address/username/password, HTTP url etc. I'm guessing I can use AJAX for this?

Thanks


If you're going to use AJAX to accomplish this, a good starting point is to make it work without JavaScript enabled. This may sound counter-intuitive, but it will mean that you have to write all the code which renders and handles the forms based on the submitted information. If you do this in a modular way, it is then a simple matter to add in the AJAX functionality to request and submit the forms, and you will know that your solution degrades gracefully as well.


AJAX is one approach, though for simple forms it might be easier just to to render them all and hide them, then show the one you want the user to fill in.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜