0. imho Nishant and Abhinav's answers give you exactly what you need to figure out what's going wrong.
1. you may wish to tag your question with 'ASP.NET'
2. is it absolutely clear that the second button has a valid reference to Panel3 where the DropDownLists are created in a loop at run-time ?
3. One suggestion: related to your creating DropDownLists in a loop. Why not keep a valid List of them as they are created for future reference:
public List<dropdownlist> ddList = new List<dropdownlist>();
for (int i = 0; i < a; i++)
d = new DropDownList();
d.ID = "Text" + i;
Then, you can access them by index number as needed rather than using the 'indirect parsed look-up' inherent in the call to 'FindControl.
But, keep in mind that you may need to use some further technique ... other than using the modifier 'public' on the List declaration ... to expose this List of Type DropDownList to consumers if they are in a different class, container, etc.
To handle that, my choice would be to make the List private, and then expose it via a Public Property.