Click here to Skip to main content
15,903,203 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: ExecuteScalar:Connection property has not been initialized Pin
saravanan0524-Apr-09 18:09
saravanan0524-Apr-09 18:09 
GeneralRe: ExecuteScalar:Connection property has not been initialized Pin
SayreCC24-Apr-09 18:38
SayreCC24-Apr-09 18:38 
GeneralRe: ExecuteScalar:Connection property has not been initialized Pin
saravanan0524-Apr-09 23:02
saravanan0524-Apr-09 23:02 
Questionfloating panel, progress bar Pin
mark_me24-Apr-09 17:06
mark_me24-Apr-09 17:06 
Questionmaster page problem Pin
mark_me24-Apr-09 16:12
mark_me24-Apr-09 16:12 
AnswerRe: master page problem Pin
SayreCC24-Apr-09 17:28
SayreCC24-Apr-09 17:28 
QuestionRe: master page problem Pin
mark_me24-Apr-09 18:13
mark_me24-Apr-09 18:13 
QuestionNeed help with gridview datakeys property ! Pin
guitaret24-Apr-09 13:45
guitaret24-Apr-09 13:45 
I have a gridview loaded from an sql datasource then in an item template in the gridview I have a dropdownlist that is supposingly loading from another sql datasource having the property datakeys of the gridview as its control parameter name.
meaning: each row has a ddl that takes its datakey as parameter to display results form another sql datasource;
and I have set the datakeynames of the gridview to be "OrderId" the pk that I want to use as the parameter. The idea is that I want to use the datakeys property of the gridview instead of selecteddatakey coz I want the user to have all data loaded once without the need to postback everytime he selects a row ...
the first sql datasource is loading the data into the gridview without any problem but when I assign the sqldatasource to the ddl the following error appears:
Type 'System.Web.UI.WebControls.DataKeyArray' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.

code for gridview:

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="OrderId"
DataSourceID="SqlDataSource1" CellPadding="4" DataMember="DefaultView"
ForeColor="#333333" GridLines="None" PageSize="15">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="OrderId" HeaderText="OrderId" ReadOnly="True"
SortExpression="OrderId" />
<asp:BoundField DataField="FullName" HeaderText="FullName" ReadOnly="True"
SortExpression="FullName" />
<asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
<asp:BoundField DataField="Comments" HeaderText="Comments"
SortExpression="Comments" />
<asp:BoundField DataField="Region" HeaderText="Region"
SortExpression="Region" />
<asp:BoundField DataField="Street" HeaderText="Street"
SortExpression="Street" />
<asp:BoundField DataField="PhoneNumber" HeaderText="PhoneNumber"
SortExpression="PhoneNumber" />
<asp:BoundField DataField="Total" HeaderText="Total" ReadOnly="True"
SortExpression="Total" />
<asp:TemplateField HeaderText="Order">
<ItemTemplate>
<asp:DropDownList ID="DropDownList3" runat="server"
DataSourceID="SqlDataSource3" DataTextField="LIST" DataValueField="LIST">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>

code for the ddl datasource:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
SelectCommand="SELECT CAST(OrderDetails.Quantity AS varchar(3)) + ' ' + Menu.Name+ ' ' + CAST(OrderDetails.UnitPrice AS varchar(7)) AS LIST FROM Menu INNER JOIN OrderDetails ON OrderDetails.ItemId = Menu.ID WHERE (OrderDetails.OrderId = @OrderId)">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="OrderId"
PropertyName="DataKeys" />
</SelectParameters>
</asp:SqlDataSource>


I want to load the ddl3 without the use of selectteddatakey(and the event selectedindexchanged) just with the help of datakeys and some code if needed and I will apreciate any help coz I am working on this for days and I'm beginning to think it's a bug coz everything seams to be ok untill the lovely error appears. be precise!I need your help, thank you
QuestionMicrosoft.Win64.RegistryKey?!!! Pin
swetha sankaran24-Apr-09 8:37
swetha sankaran24-Apr-09 8:37 
AnswerRe: Microsoft.Win64.RegistryKey?!!! Pin
Ryomin24-Apr-09 8:51
professionalRyomin24-Apr-09 8:51 
GeneralRe: Microsoft.Win64.RegistryKey?!!! Pin
swetha sankaran24-Apr-09 9:44
swetha sankaran24-Apr-09 9:44 
QuestionGot it(atleast partially) Pin
swetha sankaran24-Apr-09 9:41
swetha sankaran24-Apr-09 9:41 
AnswerRe: Got it(atleast partially) Pin
Ryomin24-Apr-09 9:50
professionalRyomin24-Apr-09 9:50 
AnswerGot It Pin
Ryomin24-Apr-09 9:59
professionalRyomin24-Apr-09 9:59 
GeneralRe: Got It Pin
swetha sankaran24-Apr-09 10:01
swetha sankaran24-Apr-09 10:01 
AnswerStop posting and deleting Pin
AlexeiXX324-Apr-09 10:51
AlexeiXX324-Apr-09 10:51 
GeneralRe: Stop posting and deleting Pin
swetha sankaran24-Apr-09 13:27
swetha sankaran24-Apr-09 13:27 
GeneralRe: Stop posting and deleting Pin
AlexeiXX324-Apr-09 13:37
AlexeiXX324-Apr-09 13:37 
Question[Message Deleted] Pin
swetha sankaran24-Apr-09 7:49
swetha sankaran24-Apr-09 7:49 
AnswerRe: Object reference not set to an instance of an object. Pin
Sandeep Akhare24-Apr-09 7:55
Sandeep Akhare24-Apr-09 7:55 
AnswerRe: Object reference not set to an instance of an object. Pin
Rolando CC24-Apr-09 7:56
professionalRolando CC24-Apr-09 7:56 
AnswerRe: Object reference not set to an instance of an object. Pin
Rolando CC24-Apr-09 8:00
professionalRolando CC24-Apr-09 8:00 
AnswerRe: Object reference not set to an instance of an object. Pin
Ryomin24-Apr-09 8:03
professionalRyomin24-Apr-09 8:03 
Question[Message Deleted] Pin
swetha sankaran24-Apr-09 8:26
swetha sankaran24-Apr-09 8:26 
AnswerRe: Object reference not set to an instance of an object. Pin
Rolando CC24-Apr-09 8:37
professionalRolando CC24-Apr-09 8:37 

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.