CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2005_express Tags:
Item Type: NewsGroup Date Entered: 5/11/2005 5:55:07 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 55 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
ahmeddami
Asp.Net User
DetailsView and EditItemTemplate5/11/2005 5:55:07 PM

0/0

Hi,

I have a DetailsView associated with an objectdatasource with many rows. I have problems with a row decalred as Template fields. My code looks like

<asp:TemplateField HeaderText="First Name" >

<ItemTemplate>

<asp:Label ID="Label1" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="FirstNameID" Runat="server"

Text='<%#DataBinder.Eval(Container.DataItem, "FirstName")%>'/>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server"

ErrorMessage="You must provide a First Name."

ControlToValidate="FirstNameID"> *</asp:RequiredFieldValidator>

</EditItemTemplate>

</asp:TemplateField>

 

My Problem is that when trying to update the detailsview. When calling my function the does the update the FirstName is always empty no matter what I put in it. And all the other bound fields look goog

The UpdateParamater section looks like:

 

<UpdateParameters >

<asp:Parameter Name="FirstName" Type="String" />

</UpdateParameters>

 

Luis Abreu
Asp.Net User
Re: DetailsView and EditItemTemplate5/11/2005 7:20:18 PM

0/0

Hello.

On your detailsview control replace the DataBinder.Eval with Bind so that you have a 2 way binding. You don't need to add a parameter to the updateparameters property because the detailsview control does that automatically for you.


--
Regards,
Luis Abreu
email: labreu_at_gmail.com
PT blog: http://weblogs.pontonetpt.com/luisabreu
EN blog:http://msmvps.com/blogs/luisabreu
http://www.pontonetpt.com
http://weblogs.pontonetpt.com/
ahmeddami
Asp.Net User
Re: DetailsView and EditItemTemplate5/15/2005 5:53:22 AM

0/0

Thank you Luis Abreu. The Two way binding method "Bind" worked for me.
andrianruz
Asp.Net User
Re: DetailsView and EditItemTemplate7/25/2006 6:12:17 AM

0/0

Hi,

Anybody know what is the missing in the statement below. When I view in browser the page is run okay and no error return, but lblname label is not display the value of the field..

asp:Label ID="lblName" runat="server" Text='<%# Eval("LAST_NAME") %>' </asp:label>

Thank you in advance for the help

Andrian

andrianruz
Asp.Net User
Re: DetailsView and EditItemTemplate7/25/2006 6:13:44 AM

0/0

Hi,

Anybody know what is the missing in the statement below. When I view in browser the page is run okay and no error return, but lblname label is not display the value of the field..

asp:Label ID="lblName" runat="server" Text='<%# Eval("LAST_NAME") %>' </asp:label>

Thank you in advance for the help

Andrian

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 2.0 Databases: Beta Preview Authors: John Kauffman, Thiru Thangarathinam, Pages: 427, Published: 2005
Beginning ASP.NET 2.0 Databases: From Novice to Professional Authors: Damien Foggon, Pages: 625, Published: 2006
ASP.NET AJAX Programmer's Reference: With ASP.NET 2.0 Or ASP.NET 3.5 Authors: Shahram Khosravi, Pages: 1522, Published: 2007
ASP.NET 2.0 MVP Hacks and Tips Authors: David Yack, Joe Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear, Pages: 400, Published: 2006
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Practical .NET2 and C#2: Harness the Platform, the Language, the Framework Authors: Patrick Smacchia, Pages: 896, Published: 2006
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Beginning C# 2005 Databases Authors: Karli Watson, Pages: 501, Published: 2006

Web:
DetailsView and EditItemTemplate - ASP.NET Forums NET Forums » Visual Studio » Visual Web Developer 2005 Express » DetailsView and EditItemTemplate ... Re: DetailsView and EditItemTemplate ...
Creating a Custom Row in a DetailsView Web Server Control DetailsView control can automatically generate rows from the fields provided ... layout for when users edit a data row, you can create an EditItemTemplate. ...
Parag's Weblog : ASP.NET 2.0 - Cannot find control in ... Jan 16, 2006 ... NET 2.0 - Cannot find control in EditItemTemplate of DetailsView Control. Recently we got some cases in ASP.NET 2.0, where customers were ...
How to access control in edititemtemplate of detailsview? (ASP 2.0 I have 2 listboxes in the edititemtemplate of a detailsview. In the databound event of the detailsview I would like to fill the listboxes ...
DetailsView EditItemTemplate DropdownList Update Problem I have a DetailsView with a DropDownList in an EditItemTemplate, I know, ... HeaderText=
DropDownList inside of EditItemTemplate inside of DetailsView :P ... Hey everyone! I have a DetailsView control, with an EditItemTemplate, and inside that..i have a DropDownList. The DropDownList is full of Roles that a user ...
How to access control in edititemtemplate of detailsview? (ASP 2.0 How to access control in edititemtemplate of detailsview? (ASP 2.0 - Microsoft ASP .NET. Visit our forum to discuss How to access control in ...
How to access control in edititemtemplate of detailsview? (ASP 2.0 ... How to access control in edititemtemplate of detailsview? (ASP 2.0. Get answers to your questions in our .NET ASP forum.
DetailsView - EditItemTemplate - field validator??? Talk about DetailsView - EditItemTemplate - field validator???
DetailsView EditItemTemplate CheckBox control - ASP.NET Forums Re: DetailsView EditItemTemplate CheckBox control. 03-17-2006, 2:53 PM. Contact ... Re: DetailsView EditItemTemplate CheckBox control ...




Search This Site:










how to creat a download page?

ninasfreeskinshelpfiles.chm is a restricted file type

asp.net + sql database

login view control??

test driven development (nunit & fit)

embedding windows remote desktop activex control in a web page

validation problem

moving from j2ee to .net, couple of architechtual questions

how to handle concurrent users limitation validation on asp.net website

dragdroplist and profileservice

validationgroup on textbox,checkbox etc

receiving a posted a xml stream

dnn 2.0.2 b3 error on up, down, delete module

vcards and dnn

publish my website???

skin bug 2.12

getting file permissions

some advice on concurrency etc

charting module

odbc parameter problem

problem in loging out

validator unable to find control id

2.0 authentication with existing users table...?

treeview1.nodes[1].expand(); error

dnn4 - endless install loop

change default focus on postback.

very new to dot net nuke

version information

dynamically applying different style sheets to a masterpage.master page

wierd asp.net 2.0 menu behavior in ie7

 
All Times Are GMT