FormView Control

G

Guest

Hello,

I just started learning about the formview control in asp.net 2.0. I am
using the following. The problem I am having is that the data is not showing
on the web.

<form id="form1" runat="server">
<div>
<asp:FormView ID="DetailsView1" Runat="server" >
<ItemTemplate>
<table>
<tr>
<td valign="top">steven</td>
<td valign="top">lisa</td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
</div>
</form>
 
S

Steven Cheng[MSFT]

Hi sck10,

The FormView control in asp.net 2.0 is something like the DataGrid or
Repeater control in asp.net1.1 which is called Template DataBound control.
As for such controls, they display datas according to the datasource we
assigned to them and what we set in the aspx page is the binding
template(not the finally display content). We need to specify databinding
expressions in the template so that at runtime, the control will loop
through the datasource and apply the template in each dataitem in the
datasource. Here is a blog article which has provide a simple demo on the
FormView

#FormView control in ASP.Net 2.0
http://normen.mine.nu/MyBlog/viewpost.aspx?PostID=102

Also, here are some other reference on asp.net template databound control
and databound:

#Understanding Templates in ASP.NET
http://msdn.microsoft.com/msdnmag/issues/02/01/cutting/default.aspx

#Building DataBound Templated Custom ASP.NET Server Controls
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html
/databoundtemplatedcontrols.asp

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi sck10,

Have you got any further progresses or any new ideas on this issue? IF
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top