Hi guys,
I have a dropdownlist on Master Page which is Bind with XML file.
I tried to get value from my conten page by using the following code but failed.
Can you please advise me?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ddlCurrency As DropDownList = TryCast(Master.FindControl("ddl_currency"), DropDownList)
Me.Label1.Text = ddlCurrency.SelectedItem.Text
End Sub
My error message:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. ...
Go to the complete details ...