Click here to Skip to main content
15,912,897 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Add control to panel Runtime Pin
eyeseetee7-Oct-08 23:54
eyeseetee7-Oct-08 23:54 
GeneralRe: Add control to panel Runtime Pin
omlac8-Oct-08 0:07
omlac8-Oct-08 0:07 
QuestionExport Datagrid to Excel using ASP.Net Pin
mullamootil7-Oct-08 23:36
mullamootil7-Oct-08 23:36 
AnswerRe: Export Datagrid to Excel using ASP.Net Pin
HemJoshi7-Oct-08 23:53
HemJoshi7-Oct-08 23:53 
GeneralRe: Export Datagrid to Excel using ASP.Net Pin
mullamootil8-Oct-08 20:14
mullamootil8-Oct-08 20:14 
AnswerRe: Export Datagrid to Excel using ASP.Net Pin
Sneha Bisht8-Oct-08 1:44
Sneha Bisht8-Oct-08 1:44 
GeneralRe: Export Datagrid to Excel using ASP.Net Pin
calf20088-Oct-08 15:17
calf20088-Oct-08 15:17 
QuestionProblem with Placeholder control [modified] Pin
eyeseetee7-Oct-08 23:30
eyeseetee7-Oct-08 23:30 
I am adding controls to a placeholder on the fly.
I could have any number of controls in there but its usually about 5.
I am adding a label and a textbox to the placeholder.

Now when I loop the placeholder I have the following code:
The textbox value works fine it finds the correct value, but I cant find the label value, why is this?
Any help would be great.
thanks
PlaceHolder placeHolder1 = (PlaceHolder)FindControl("PlaceHolder2");
         foreach (Control c in PlaceHolder2.Controls)
             {
               if (c.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox"))
                  {
                   Label lb2 = (Label)c;
                   TextBox tb2 = (TextBox)c;

                   SqlCommand cmdinsertliftunion = new SqlCommand("INSERT INTO table(field1, field2) VALUES ('" + lb2.Text + "', '" + tb2.Text + "')", con);
                   cmdinsert.ExecuteNonQuery();
                   }
             }


Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"

modified on Wednesday, October 8, 2008 5:39 AM

AnswerRe: Problem with Placeholder control Pin
thomasa8-Oct-08 0:01
thomasa8-Oct-08 0:01 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 0:15
eyeseetee8-Oct-08 0:15 
GeneralRe: Problem with Placeholder control Pin
thomasa8-Oct-08 1:16
thomasa8-Oct-08 1:16 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 0:21
eyeseetee8-Oct-08 0:21 
GeneralRe: Problem with Placeholder control Pin
thomasa8-Oct-08 1:18
thomasa8-Oct-08 1:18 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 1:23
eyeseetee8-Oct-08 1:23 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 1:28
eyeseetee8-Oct-08 1:28 
GeneralRe: Problem with Placeholder control [modified] Pin
thomasa8-Oct-08 1:58
thomasa8-Oct-08 1:58 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 2:26
eyeseetee8-Oct-08 2:26 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 2:31
eyeseetee8-Oct-08 2:31 
GeneralRe: Problem with Placeholder control Pin
thomasa8-Oct-08 3:16
thomasa8-Oct-08 3:16 
GeneralRe: Problem with Placeholder control Pin
thomasa8-Oct-08 3:40
thomasa8-Oct-08 3:40 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 4:12
eyeseetee8-Oct-08 4:12 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 21:47
eyeseetee8-Oct-08 21:47 
GeneralRe: Problem with Placeholder control Pin
J4amieC8-Oct-08 1:44
J4amieC8-Oct-08 1:44 
GeneralRe: Problem with Placeholder control Pin
eyeseetee8-Oct-08 2:22
eyeseetee8-Oct-08 2:22 
GeneralRe: Problem with Placeholder control Pin
J4amieC8-Oct-08 2:37
J4amieC8-Oct-08 2: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.