Click here to Skip to main content
15,925,181 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: File upload control and File size ? Pin
Christian Flutcher15-Jun-08 20:16
Christian Flutcher15-Jun-08 20:16 
GeneralRe: File upload control and File size ? Pin
Masood Kochi,SSF15-Jun-08 20:39
Masood Kochi,SSF15-Jun-08 20:39 
QuestionMedia Player in WebPage ? Pin
Masood Kochi,SSF15-Jun-08 19:04
Masood Kochi,SSF15-Jun-08 19:04 
AnswerRe: Media Player in WebPage ? Pin
Christian Flutcher15-Jun-08 20:17
Christian Flutcher15-Jun-08 20:17 
GeneralRe: Media Player in WebPage ? Pin
Masood Kochi,SSF15-Jun-08 20:24
Masood Kochi,SSF15-Jun-08 20:24 
GeneralRe: Media Player in WebPage ? Pin
Christian Flutcher15-Jun-08 20:48
Christian Flutcher15-Jun-08 20:48 
GeneralRe: Media Player in WebPage ? Pin
Masood Kochi,SSF15-Jun-08 20:56
Masood Kochi,SSF15-Jun-08 20:56 
Questiondynamic dropdown list getting hide in autopostback event..........., Pin
Member 387988115-Jun-08 19:01
Member 387988115-Jun-08 19:01 
Hi i am trying to create dynamic controls which is dropdownlist & updatepanels...,

The first dropdown is static based on that event im creating my dynamic controls...,

But iam getting probs in newly created dropdown, if i give its property autopostback=true...,
Then whenever iam selecting that one its getting hide...,

How to solve this this is my code:
public partial class DynamicUpdatepanelswithDropDown : System.Web.UI.Page
{
string strSQLconnection = mysqlconnection;
DataSet ds;
SqlDataAdapter sqldad;
private DropDownList dd1;
private DropDownList dd2;

private DropDownList dd3;
UpdatePanel u1;
UpdatePanel u2;
AsyncPostBackTrigger trigger;
AsyncPostBackTrigger trigger1;
protected void Page_Load(object sender, EventArgs e)
{
u1 = new UpdatePanel();

trigger = new AsyncPostBackTrigger();
trigger.ControlID = DropDownList1.UniqueID;
trigger.EventName = "SelectedIndexChanged";
u1.Triggers.Add(trigger);
Page.Form.Controls.Add(u1);


}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{

if ((DropDownList1.SelectedItem.Text=="One") || (DropDownList1.SelectedItem.Text=="Two" ))
{
dd1 = new DropDownList();
//dd1.AutoPostBack = true;
//dd1.SelectedIndexChanged += new EventHandler(dd1_SelectedIndexChanged);

SqlConnection sqlConnection = new SqlConnection(strSQLconnection);

SqlCommand sqlCommand = new SqlCommand("select * from tbl_Country", sqlConnection);

sqlConnection.Open();

SqlDataReader reader = sqlCommand.ExecuteReader();

dd1.DataSource = reader;

dd1.DataValueField = "CID";

dd1.DataTextField = "CName";

dd1.DataBind();

dd1.Items.Insert(0, "--Select One--");

u1.ContentTemplateContainer.Controls.Add(dd1);

}

else
{
SqlConnection sqlConnection = new SqlConnection(strSQLconnection);

SqlCommand sqlCommand = new SqlCommand("select * from tbl_Country", sqlConnection);

sqlConnection.Open();

SqlDataReader reader = sqlCommand.ExecuteReader();

GridView1.DataSource = reader;

GridView1.DataBind();

u1.ContentTemplateContainer.Controls.Add(GridView1);

}

}

Thanks & Regards,
NeW OnE,
please don't forget to vote on the post

QuestionProblem in dublicates Pin
Srigurusankar15-Jun-08 18:00
Srigurusankar15-Jun-08 18:00 
Questiontree structure Pin
ChinaTJBoy15-Jun-08 17:59
ChinaTJBoy15-Jun-08 17:59 
AnswerRe: tr Pin
JimBob SquarePants15-Jun-08 18:24
JimBob SquarePants15-Jun-08 18:24 
AnswerRe: tree structure Pin
Ravi Sant3-May-11 0:32
Ravi Sant3-May-11 0:32 
Questionupdate program variable from client side javascript Pin
JimmyRopes15-Jun-08 16:25
professionalJimmyRopes15-Jun-08 16:25 
AnswerRe: update program variable from client side javascript Pin
Christian Graus15-Jun-08 16:37
protectorChristian Graus15-Jun-08 16:37 
GeneralRe: update program variable from client side javascript Pin
JimmyRopes16-Jun-08 10:41
professionalJimmyRopes16-Jun-08 10:41 
QuestionVS2003 ASP.Net 1.1 Designer Error Pin
Crow-knee15-Jun-08 15:41
Crow-knee15-Jun-08 15:41 
QuestionTreeView control - Tree Node data bindings are empty!! Pin
Member 340288615-Jun-08 9:27
Member 340288615-Jun-08 9:27 
AnswerRe: TreeView control - Tree Node data bindings are empty!! Pin
Christian Graus15-Jun-08 9:49
protectorChristian Graus15-Jun-08 9:49 
QuestionERROR [42S22] [Microsoft][ODBC Visual FoxPro Driver]SQL: Column 'columnname' is not found. Pin
amistry_petlad15-Jun-08 6:09
amistry_petlad15-Jun-08 6:09 
Questionproblem in refreshing the page with time interval Pin
vijaylumar15-Jun-08 2:39
vijaylumar15-Jun-08 2:39 
AnswerRe: problem in refreshing the page with time interval Pin
Christian Graus15-Jun-08 2:40
protectorChristian Graus15-Jun-08 2:40 
Questionprint ing in asp.net 2.0 Pin
vijaylumar15-Jun-08 2:13
vijaylumar15-Jun-08 2:13 
Answer[Duplicate]Re: print ing in asp.net 2.0 Pin
Scott Dorman15-Jun-08 2:20
professionalScott Dorman15-Jun-08 2:20 
Questionprinting in asp.net 2.0 Pin
vijaylumar15-Jun-08 2:11
vijaylumar15-Jun-08 2:11 
AnswerRe: printing in asp.net 2.0 Pin
Scott Dorman15-Jun-08 2:22
professionalScott Dorman15-Jun-08 2:22 

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.