Click here to Skip to main content
15,899,679 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionButton Id Problem Pin
Ajeet mittal10-Jul-08 2:58
Ajeet mittal10-Jul-08 2:58 
AnswerRe: Button Id Problem Pin
Sherin Iranimose10-Jul-08 3:57
Sherin Iranimose10-Jul-08 3:57 
GeneralRe: Button Id Problem Pin
Ajeet mittal10-Jul-08 19:24
Ajeet mittal10-Jul-08 19:24 
GeneralRe: Button Id Problem Pin
Sherin Iranimose10-Jul-08 20:10
Sherin Iranimose10-Jul-08 20:10 
GeneralRe: Button Id Problem Pin
Ajeet mittal10-Jul-08 23:14
Ajeet mittal10-Jul-08 23:14 
GeneralRe: Button Id Problem Pin
Sherin Iranimose10-Jul-08 23:43
Sherin Iranimose10-Jul-08 23:43 
QuestionCannot implicitly convert type 'int' to 'string' Pin
eyeseetee10-Jul-08 2:55
eyeseetee10-Jul-08 2:55 
AnswerRe: Cannot implicitly convert type 'int' to 'string' Pin
Herman<T>.Instance10-Jul-08 3:04
Herman<T>.Instance10-Jul-08 3:04 
Your Code
for (int x = 0; x < GridView1.Rows.Count; x++)
            {
                  GridViewRow row = GridView1.Rows[x];
                  dropdown = ((DropDownList)row.FindControl("ddorder"));

                  int count =+ 1;                  
                  dropdown.DataValueField = count;
} 


Tip:
Or the control does not exist
or it should be count.ToString();



Int32 count = 0;
DropDownList dropdown = new DropDownList();
foreach (GridViewRow row in GridView1.Rows)
{
   try
   {
      dropdown = ((DropDownList)row.FindControl("ddorder"));
      count++;
      dropdown.DataValueField = count.ToString();
   }
   catch (Exception err)
   {
      /// Do Someting with err.Message;
   }
}


Good Luck
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
eyeseetee10-Jul-08 3:09
eyeseetee10-Jul-08 3:09 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
Herman<T>.Instance10-Jul-08 3:18
Herman<T>.Instance10-Jul-08 3:18 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
eyeseetee10-Jul-08 3:31
eyeseetee10-Jul-08 3:31 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
Herman<T>.Instance10-Jul-08 3:36
Herman<T>.Instance10-Jul-08 3:36 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
eyeseetee10-Jul-08 3:44
eyeseetee10-Jul-08 3:44 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
Herman<T>.Instance10-Jul-08 6:22
Herman<T>.Instance10-Jul-08 6:22 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
Guffa10-Jul-08 4:08
Guffa10-Jul-08 4:08 
GeneralRe: Cannot implicitly convert type 'int' to 'string' Pin
Herman<T>.Instance10-Jul-08 6:18
Herman<T>.Instance10-Jul-08 6:18 
AnswerRe: Cannot implicitly convert type 'int' to 'string' [modified] Pin
Herman<T>.Instance10-Jul-08 3:31
Herman<T>.Instance10-Jul-08 3:31 
Question[Message Deleted] Pin
ash0410-Jul-08 2:45
ash0410-Jul-08 2:45 
AnswerRe: HttpContext.Current.Session Pin
Herman<T>.Instance10-Jul-08 3:24
Herman<T>.Instance10-Jul-08 3:24 
GeneralRe: HttpContext.Current.Session Pin
ash0410-Jul-08 4:16
ash0410-Jul-08 4:16 
GeneralRe: HttpContext.Current.Session Pin
Herman<T>.Instance10-Jul-08 6:25
Herman<T>.Instance10-Jul-08 6:25 
GeneralRe: HttpContext.Current.Session Pin
ash0410-Jul-08 22:01
ash0410-Jul-08 22:01 
QuestionVBA.Calendar = vbCalHijri Pin
Bhim Prakash Singh10-Jul-08 1:48
Bhim Prakash Singh10-Jul-08 1:48 
QuestionProblem with file upload using Pure ASP Pin
M LN Rao10-Jul-08 1:28
M LN Rao10-Jul-08 1:28 
AnswerRe: Problem with file upload using Pure ASP Pin
Sutheesh chandran10-Jul-08 1:38
Sutheesh chandran10-Jul-08 1:38 

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.