code-behing page given below:-
string stremployeename = ddrpref.SelectedValue.Trim();
string stremployeename = txtEmployeename.Text.Trim();
how i can declare both....
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsForums
Top experts
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
CrishRank #1,487 · 1.1K reputationPosted May 13, 2010, 1:03 AM EDT
just write condition in codebehind..
string stremployeename = string.empty;
if (txtEmployeename.Text.Trim() != string.empty)
{
stremployeename = txtEmployeename.Text.Trim();
}
else
{
stremployeename = ddrpref.SelectedValue.Trim();
}
thanks