code-behing page given below:-
string stremployeename = ddrpref.SelectedValue.Trim();
string stremployeename = txtEmployeename.Text.Trim();
how i can declare both....
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
CrishPosted May 13, 2010, 5:03 AM
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