Need to force event to fire whem Drop Down List has only one line item....

bripena

Newcomer
Joined
Oct 14, 2004
Messages
1
Need Help- First Timer_ Drop Down List......

Hello!
I am really having a difficult time getting my Drop Down List to go on to my next page when one line item is returned. Currently- my code reads that when the Name 'changes' fire to next page- I do not know how to force it to fire if the drop down only reutrns one name..... Any thoughts. PLEASE SEE CODE BELOW>>>>
private void cmdSelect_Click(object sender, System.EventArgs e)
{lblFaculty.Visible=true;
String varName;
String strSP1="up_PROFILE_Name_lookup";
//String strSP2="up_PROFILE_Name_lookup_YTD";
varName=txtEntry.Text;




DataSet ds= new DataSet("mydataset");
SqlDataAdapter da = new SqlDataAdapter();

conn =new SqlConnection();
conn.ConnectionString = "user id=WebClient;data source=siweb;per" +
"sist security info=True;initial catalog=HR_Data;password=Client";
cmd=new SqlCommand();
cmd.Connection=conn;
cmd.CommandType=CommandType.StoredProcedure;
cmd.CommandText=strSP1;



cmd.Parameters.Add(new SqlParameter("@Name",varName));
da.SelectCommand =cmd;
da.Fill(ds);
[Name"].ToString();

Faculty.DataSource=ds.Tables[0];
Faculty.DataBind();
da.Dispose();
conn.Close();
Faculty.Visible=true;
}

:confused:
 
Last edited:
Back
Top