Click here to Skip to main content
15,893,381 members
Home / Discussions / C#
   

C#

 
GeneralRe: Smart Device Application Pin
Heath Stewart21-Sep-04 11:12
protectorHeath Stewart21-Sep-04 11:12 
GeneralRe: Smart Device Application Pin
Chris Quick21-Sep-04 12:17
Chris Quick21-Sep-04 12:17 
GeneralRe: Smart Device Application Pin
mathon21-Sep-04 13:53
mathon21-Sep-04 13:53 
GeneralRe: Smart Device Application Pin
Heath Stewart21-Sep-04 14:31
protectorHeath Stewart21-Sep-04 14:31 
GeneralRe: Smart Device Application Pin
mathon21-Sep-04 22:08
mathon21-Sep-04 22:08 
GeneralHelp on setting index of dropdownlist. Pin
macsgirl21-Sep-04 9:46
macsgirl21-Sep-04 9:46 
GeneralRe: Help on setting index of dropdownlist. Pin
Colin Angus Mackay21-Sep-04 12:00
Colin Angus Mackay21-Sep-04 12:00 
GeneralRe: Help on setting index of dropdownlist. Pin
macupryk21-Sep-04 12:32
macupryk21-Sep-04 12:32 
I did as you told me and still having problems. Also when I have to go back in edit mode I must have the dropdownlist index preselected. But one thing at a time. Below the code is the error, this is why I cast it. Now, if I want to save the index how to I go about doing so. I appreciate any help. Thanks.
private void DataGridUserManagementID_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
string strStore;

ListItemType oType = ((ListItemType)e.Item.ItemType);
if ((oType == ListItemType.EditItem))
{


DropDownList listStore = e.Item.FindControl("ddlStores");
strStore = listStore.SelectedItem.Text;
Response.Write(strStore);
}

}

Server Error in '/MSPOS' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0029: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.DropDownList'

Source Error:



Line 178:
Line 179:
Line 180: DropDownList listStore = e.Item.FindControl("ddlStores");
Line 181: strStore = listStore.SelectedItem.Text;
Line 182: Response.Write(strStore);


Source File: c:\inetpub\wwwroot\MSPOS\Administrator.aspx Line: 180




Mathieu Cupryk
GeneralRe: Help on setting index of dropdownlist. Pin
Colin Angus Mackay21-Sep-04 12:47
Colin Angus Mackay21-Sep-04 12:47 
GeneralRe: Help on setting index of dropdownlist. Pin
macupryk21-Sep-04 13:00
macupryk21-Sep-04 13:00 
GeneralRe: Help on setting index of dropdownlist. Pin
Colin Angus Mackay21-Sep-04 13:12
Colin Angus Mackay21-Sep-04 13:12 
GeneralConfigurable font height/width Pin
Yaron K.21-Sep-04 7:44
Yaron K.21-Sep-04 7:44 
GeneralRe: Configurable font height/width Pin
Heath Stewart21-Sep-04 11:33
protectorHeath Stewart21-Sep-04 11:33 
GeneralRe: Configurable font height/width Pin
Yaron K.21-Sep-04 19:01
Yaron K.21-Sep-04 19:01 
GeneralRe: Configurable font height/width Pin
Yaron K.22-Sep-04 22:37
Yaron K.22-Sep-04 22:37 
Generalproblem with c# (help required) Pin
Anonymous21-Sep-04 7:30
Anonymous21-Sep-04 7:30 
GeneralRe: problem with c# (help required) Pin
tdciDoug21-Sep-04 10:39
tdciDoug21-Sep-04 10:39 
GeneralRe: problem with c# (help required) Pin
Christian Graus21-Sep-04 10:44
protectorChristian Graus21-Sep-04 10:44 
GeneralHelp with books Pin
krisst_k21-Sep-04 7:21
krisst_k21-Sep-04 7:21 
GeneralRe: Help with books Pin
Werdna22-Sep-04 6:18
Werdna22-Sep-04 6:18 
GeneralC# Downloader Pin
shiraztk21-Sep-04 7:11
shiraztk21-Sep-04 7:11 
GeneralRe: C# Downloader Pin
Dave Kreskowiak21-Sep-04 8:34
mveDave Kreskowiak21-Sep-04 8:34 
GeneralRe: C# Downloader Pin
Alex Korchemniy21-Sep-04 10:24
Alex Korchemniy21-Sep-04 10:24 
GeneralRe: C# Downloader Pin
Heath Stewart21-Sep-04 11:16
protectorHeath Stewart21-Sep-04 11:16 
GeneralRe: C# Downloader Pin
shiraztk21-Sep-04 18:03
shiraztk21-Sep-04 18:03 

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.