Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

update parameter question in detailView?

Hi,

I have this detailview and i am using a dropdown in the editform.
I also used sqldatasource to update the record by passing the parameter.
Without the dropdown in the editform (all regular textboxes), it gets update fine.

But when I insert the dropdown in the edittemplate, it doesn't get update and no error pops up.
I don't know how to debug this since I don't get any errors when I run it.

As an example, say I have this address table(ID,Name,Address,Type)

I thought I can use fixed parameter and controlparameter.
But it doesn't get updated.

How can I debug this??
Should I stay away from the sqldatasource and use the stored proc or code in code behind page??

<asp:sqldatasource id=sqldatasource1
selectcommand="select id,name,address,type from address where (id=@id)"
updatecommand = "update address set name=@name,address=@address,type=@type where (id=@id)">
<selectParamenters>
<asp:querystringparameters name=id querystringfield=id type=int/>
</selectparamenters>
<updateparameters>
<asp:parameter>...
<asp:controlparameter>...
</updateparameters>
 
 
I thought I can use fixed parameter and controlparameter.
But it doesn't get updated.

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of CmdoProg2
CmdoProg2
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18
dkim18

ASKER

It works fine with default editform like your example.

When I change it to templatefield, it is not updating correctly.

I had three boundfields and one templatefield with dropdownlist.
Nothing happens.

 
Could you send me the snippet of the detail view?