Click here to Skip to main content
15,920,828 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Repost - IGNORE!!!!!!!! Pin
eyeseetee23-May-08 2:17
eyeseetee23-May-08 2:17 
Questionadd check box to gridview and get the checked rows in gridview to another gridview in c#.net Pin
senpriya23-May-08 1:46
senpriya23-May-08 1:46 
AnswerRe: add check box to gridview and get the checked rows in gridview to another gridview in c#.net Pin
sukkureddy23-May-08 2:01
sukkureddy23-May-08 2:01 
AnswerRe: add check box to gridview and get the checked rows in gridview to another gridview in c#.net Pin
Abhijit Jana23-May-08 3:04
professionalAbhijit Jana23-May-08 3:04 
QuestionHttp Handler Pin
soumyakanta23-May-08 1:35
soumyakanta23-May-08 1:35 
QuestionHow to get the selected value of a dynamically generated dropdown. Pin
SKP2423-May-08 1:29
SKP2423-May-08 1:29 
AnswerRe: How to get the selected value of a dynamically generated dropdown. Pin
Abhijit Jana23-May-08 2:56
professionalAbhijit Jana23-May-08 2:56 
GeneralRe: How to get the selected value of a dynamically generated dropdown. Pin
SKP2427-May-08 19:33
SKP2427-May-08 19:33 
Here is the complete code listing.

SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["MyCon"]);

protected void txtdeptnos_TextChanged(object sender, EventArgs e)
{

plcHolder.Controls.Clear();
for (int i = 1; i <= Convert.ToInt32(txtdeptnos.Text); i++)
{
DropDownList ddl = new DropDownList();
ddl.ID = "ddl" + i.ToString();
ddl.AppendDataBoundItems = true;
ddl.Items.Clear();
ddl.Items.Add("Select Department");
ddl.Width = 130;
ddl.Items[0].Value = "0";
string strfac = "select deptid,deptname from department where bitDeletedFlag=0";
con.Open();
DataSet ds1 = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(strfac, con);
da.Fill(ds1, "department");
ddl.DataSource = ds1.Tables["department"];
ddl.DataTextField = "deptname";
ddl.DataValueField = "deptid";
ddl.DataBind();
con.Close();
plcHolder.Controls.Add(ddl);
plcHolder.Controls.Add(new LiteralControl("
"));
plcHolder.Controls.Add(new LiteralControl("
"));
}

}

protected void BtnSave_Click(object sender, EventArgs e)
{
foreach (Control control in this.plcHolder.Controls)
{
if (control.GetType().Name == "DropDownList")
{
DropDownList dd = (DropDownList)control;
depts = depts + ", " + dd.SelectedItem.ToString();
//I want to concartinate all the selected values of the drop downs and to be inserted into the DB at this click function. But the place holder gets empty. This loop is not executing totally.
Session["val"] = dd.SelectedItem.ToString();
}
}
}

Sagar Pattnayak
Software Developer
Sun-Dew Solutions
+91-9831169962

QuestionPing Google Blog with rpc xml - Very slow Pin
eyeonspain23-May-08 1:01
eyeonspain23-May-08 1:01 
AnswerRe: Ping Google Blog with rpc xml - Very slow Pin
eyeonspain23-May-08 4:03
eyeonspain23-May-08 4:03 
Questionhow to Bind the Custom Validator to GridView Control Pin
Johndas23-May-08 0:41
Johndas23-May-08 0:41 
AnswerRe: how to Bind the Custom Validator to GridView Control Pin
eyeseetee23-May-08 1:24
eyeseetee23-May-08 1:24 
GeneralRe: how to Bind the Custom Validator to GridView Control Pin
Johndas23-May-08 1:30
Johndas23-May-08 1:30 
Questionpassword field Pin
eyeseetee22-May-08 23:58
eyeseetee22-May-08 23:58 
AnswerRe: password field Pin
N a v a n e e t h23-May-08 0:06
N a v a n e e t h23-May-08 0:06 
GeneralRe: password field Pin
eyeseetee23-May-08 0:53
eyeseetee23-May-08 0:53 
GeneralRe: password field Pin
eyeseetee23-May-08 0:58
eyeseetee23-May-08 0:58 
GeneralRe: password field Pin
N a v a n e e t h23-May-08 2:41
N a v a n e e t h23-May-08 2:41 
QuestionWeb Service, how to get local path Pin
blackjack215022-May-08 23:50
blackjack215022-May-08 23:50 
AnswerRe: Web Service, how to get local path Pin
N a v a n e e t h23-May-08 0:13
N a v a n e e t h23-May-08 0:13 
GeneralRe: Web Service, how to get local path Pin
blackjack215023-May-08 0:21
blackjack215023-May-08 0:21 
QuestionDetailView Paging Pin
jason_mf22-May-08 21:41
jason_mf22-May-08 21:41 
AnswerRe: DetailView Paging Pin
Herman<T>.Instance22-May-08 23:29
Herman<T>.Instance22-May-08 23:29 
QuestionJavascript [modified] Pin
senthilsstil22-May-08 21:24
senthilsstil22-May-08 21:24 
AnswerRe: Javascript Pin
eyeseetee22-May-08 21:28
eyeseetee22-May-08 21:28 

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.