Click here to Skip to main content
15,895,370 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: virtual directories c# Pin
Laddie25-May-08 19:58
Laddie25-May-08 19:58 
GeneralRe: virtual directories c# Pin
Abhijit Jana25-May-08 20:01
professionalAbhijit Jana25-May-08 20:01 
GeneralRe: virtual directories c# Pin
N a v a n e e t h25-May-08 20:04
N a v a n e e t h25-May-08 20:04 
GeneralRe: virtual directories c# Pin
Laddie25-May-08 20:13
Laddie25-May-08 20:13 
GeneralRe: virtual directories c# Pin
N a v a n e e t h25-May-08 20:55
N a v a n e e t h25-May-08 20:55 
QuestionCross Application Authentication (Domain Read/Set problem) Pin
RCoate25-May-08 15:15
RCoate25-May-08 15:15 
QuestionBest Practice: Thread Management: Making Asynchronous WebRequest from the server Pin
Daniel Magliola25-May-08 14:28
Daniel Magliola25-May-08 14:28 
QuestionFormView Insert record containing DropDownList value Pin
thowra25-May-08 8:48
thowra25-May-08 8:48 
Hi,

I've built a FormView with a number of fields and a corresponding insert template. It works fine and I can insert a record with no problem. However, I now want to replace one of the text fields with a dropdownlist so I can select from a number of fixed options. I've supplied a data source which references a small list of values table:

<asp:formview id="fv1" runat="server">
DataSourceID="sdsProducts" DefaultMode="Insert">
<insertitemtemplate>
Name:
<asp:textbox id="txtName" runat="server">
Type:
<asp:dropdownlist id="ddlType" runat="server">
DataSourceID="sdlType" DataTextField="Value" DataValueField="ID" />
<asp:sqldatasource id="sdlType" runat="server">
ConnectionString="<%$ ConnectionStrings:myConnStr %>"
SelectCommand="SELECT * FROM [lovType]">


<asp:sqldatasource id="sdsProducts" runat="server">
ConnectionString="<%$ ConnectionStrings:myConnStr %>"
InsertCommand="INSERT INTO [tblProducts] ([Name], [Type])
VALUES (@Name, @Type)">
<insertparameters>
<asp:parameter name="Name" type="String">
<asp:parameter name="Type" type="String">



I can see the values in the dropdownlist but it doesn't seem to insert any value for the dropdownlist. I'm having no luck with this at all. Is it even possible to place a dropdownlist control in a FormView's InsertItemTemplate?

Thanks for looking Smile | :)

Evil cannot be conquered in the world... It can only be resisted within oneself.

QuestionGet the number of response bytes of an HTTP Response Pin
Marco225025-May-08 5:20
Marco225025-May-08 5:20 
Questionrepresenting dataset after receiving from webservice Pin
Faysal25-May-08 4:53
Faysal25-May-08 4:53 
AnswerRe: representing dataset after receiving from webservice Pin
CodingYoshi25-May-08 9:06
CodingYoshi25-May-08 9:06 
GeneralRe: representing dataset after receiving from webservice Pin
Faysal25-May-08 17:10
Faysal25-May-08 17:10 
Questionformat of date Pin
ptvce24-May-08 23:35
ptvce24-May-08 23:35 
AnswerRe: format of date Pin
gnjunge25-May-08 1:30
gnjunge25-May-08 1:30 
AnswerRe: format of date Pin
derm225-May-08 7:15
derm225-May-08 7:15 
Questioncontrol & access data to a web page programmatically Pin
caradri24-May-08 22:27
caradri24-May-08 22:27 
AnswerRe: control & access data to a web page programmatically Pin
doWhileSomething25-May-08 3:10
doWhileSomething25-May-08 3:10 
QuestionIssue with ajax Update panel and Javascript Pin
Sajid A.24-May-08 22:21
Sajid A.24-May-08 22:21 
QuestionAsp.Net 2 Arabic Language Issue Pin
Aldorado24-May-08 9:16
Aldorado24-May-08 9:16 
AnswerRe: Asp.Net 2 Arabic Language Issue Pin
gnjunge25-May-08 1:19
gnjunge25-May-08 1:19 
GeneralRe: Asp.Net 2 Arabic Language Issue Pin
Aldorado25-May-08 2:03
Aldorado25-May-08 2:03 
AnswerRe: Asp.Net 2 Arabic Language Issue Pin
Mogaambo25-May-08 4:07
Mogaambo25-May-08 4:07 
GeneralRe: Asp.Net 2 Arabic Language Issue Pin
Aldorado25-May-08 4:16
Aldorado25-May-08 4:16 
GeneralRe: Asp.Net 2 Arabic Language Issue Pin
gnjunge25-May-08 11:03
gnjunge25-May-08 11:03 
GeneralRe: Asp.Net 2 Arabic Language Issue Pin
Aldorado25-May-08 11:50
Aldorado25-May-08 11:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.