Hi all,
I finally found a way to make my requirement work.
First, add the required dropdown boxes in the page we design and on C# page_load method, set the visible attribute of the dropdown boxes as false.
Ex:
protected void Page_Load(object sender, EventArgs e)
{
presenttype.Visible = false;
}
Next step is to set the parent dropdown box's attributes as follows.
OnSelectedIndexChanged="sta_Change" AutoPostBack="true"
here sta_Change is the method where we are going to write the code for displaying the hidden dropdown boxes based on the selected option in parent dropdown box as follows.
public void sta_Change(object sender, EventArgs e)
{
if (parentDropList.SelectedValue == "option")
{
presenttype.Visible = true;
}
}
That's it.
When we run the page, after we select the value in parent dropdownbox, it automatically enables the child dropdownbox due to the attribute
AutoPostBack="true"
Thanks for all who read and replied my question. I hope the solution( already available in visual studio, but many of us are still unaware about this facility.) provided was useful and simple to everyone.