But when i debug it I am getting this error
Object reference not set to an instance of an object
have gone through many links but not able to correct it.
Below is my .aspx.cs code
Expand|Select|Wrap|Line Numbers
- public static string[] GetArea(string prefixText, int count)
- {
- RadioButton rb1 = RadioButton2;
- if (rb1.Checked == true)
- {
- //execute some code
- //return something
- }
- else
- {
- //else do this.
- // return something
- }
- }
Expand|Select|Wrap|Line Numbers
- if (rb1.Checked == true)
Expand|Select|Wrap|Line Numbers
- <asp:RadioButton ID="RadioButton2" name="radios" CssClass="radio-button-style" runat="server" GroupName="list" Text="Chemist" ToolTip="SEARCH " />