开发者

Can I use the DetailsView control without binding?

I wanna use the DetailsView control without binding it with a datasource (just in insert mode开发者_StackOverflow) but the problem is when I try to get the values of the fields throught ItemInserting event handler I found the e.Values property empty however there are some fields.

Note: I wanna use it (The DetailsView control) [instead of allign the fields manually] because there're already a theme for it in whole the system and I don't want to do that again from scratch for custom template.

Any Idea !!


Ah yes, I wrote a blog post on this topic. http://weblogs.asp.net/davidfowler/archive/2008/12/12/getting-your-data-out-of-the-data-controls.aspx.

BTW in .NET 4.0 e.Values won't be empty :).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜