473,395 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

FromView EditTemplate & ItemTemplate with ObjectContainerDataSource

7
Hi Friends,

I have a FormView with EditItemTemplate with "Update & cancel " Link & ItemTemplate with "Edit" Link.
When i run the application the ItemTemplate will be running But When i click on the Edit Link The DropDownList is the EditItemTemplate is throughing the Null Execption , in this line of Code

"DropDownList ddl = (DropDownList) FormView1.FindControl("DropDownList1"); "

The ddl is null,

But When i set the FormView Defultmode in the aspx page ie.

"<FormView id="FormView1" DefaultMode="Edit" ...>"

Then the "ddl" will not be null and the data is Binded , But the starting page will be "EditItemTemplate" But i want to "ItemTemplate" as starting page.

And when i click on the "Update" Link the error is "Id" is read Only, And the services we are getting the "Id" is read only only set; on get; .
Is there any other way to slove this problem with out making the I "Id" as get;.


Thanks with regards
Anil s g
Aug 21 '07 #1
3 1950
jhardman
3,406 Expert 2GB
Anil,

What is your set up? What are you using to make your code and run it?

Jared
Aug 21 '07 #2
Anilsg
7
Anil,

What is your set up? What are you using to make your code and run it?

Jared
Hi,
U mean IDE,

Then I am using Visual studio-2005(8th version) , with Enterprise Library 3.1 & WCSF june 2007.
Aug 27 '07 #3
jhardman
3,406 Expert 2GB
Hi,
U mean IDE,

Then I am using Visual studio-2005(8th version) , with Enterprise Library 3.1 & WCSF june 2007.
Moderator, could you send this to the .NET forum?

Jared
Aug 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Antonio D'Ottavio | last post by:
Good Morning, I've a problem with a textfiled inside a datalist, in particular it's value it is not updated with the changes, I mean sNomeCampo has still the value coming from the dB and not that...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
1
by: D. Shane Fowlkes | last post by:
Hello All. I keep asking for help with this on the www.asp.net forums and nobody seems to be able to help. What I'm trying to accomplish is very simple. I simply want to create a Hyperlink...
1
by: PawelR | last post by:
Hello group, I'm new in asp.net and have one question about edit value in dataGrid. In my project I have file Mod.aspx with: <P><asp:datagrid id="dgRabaty" runat="server"...
10
by: Nathan Sokalski | last post by:
I have a DataList control with an EditTemplate. Three of the controls in this template include a Calendar, a Button with CommandName="update", and a Button with CommandName="cancel". Whenever I...
0
by: Stanley Cheung | last post by:
Dear all, i put a datalist into a user control and then apply the itemtemplate & ediiTemplate inside, i use dgXXX.itemcommand to get the commandname from button the problem is the content of...
0
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a...
1
by: Jeff | last post by:
Dear reader :-) ASP.NET 2.0 I have a GridView on my webpage. The ItemTemplate and AlternativeItemTemplate should have different background color. I've tryed this technique which don't help...
3
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.