VB.net code for .aspx page
Dim header As String
Dim footer As String
Dim margin_left As String
Dim margin_top As String
Dim margin_bottom As String
Dim bottom As Double
footer = ""
header = ""
IERegKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Internet Explorer\\PageSetup", True)
'footer = IERegKey.GetValue("footer", 0)
'header = IERegKey.GetValue("header", 0)
'margin_top = IERegKey.GetValue("margin_top", 0)
'margin_bottom = IERegKey.GetValue("margin_bottom", 0)
bottom = 0.25
IERegKey.SetValue("footer", "")
'IERegKey.SetValue("header", "")
''IERegKey.SetValue("margin_top", bottom)
'IERegKey.SetValue("margin_bottom", 0)
when project running from working project it will work ok. But when after making websetup and try to running page it will show errors as
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 56: 'margin_bottom = IERegKey.GetValue("margin_bottom", 0) Line 57: bottom = 0.25 Line 58: IERegKey.SetValue("footer", "") Line 59: 'IERegKey.SetValue("header", "") Line 60: ''IERegKey.SetValue("margin_top", bottom)
How can i recover the issue please help me