Question QueryString Problem?

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
Hi,

I m putting a link with QueryString in an email. When recipient clicks on the link it gives error "System.NullReferenceException: Object reference not set to an instance of an object."

Here is the QueryString:
VB.NET:
Dim URL As String = "http://abc/preview.aspx?formID=" + GeneralFunctions.encryptQueryString(task.FormID.ToString) + "&formType=" + GeneralFunctions.encryptQueryString(task.FormType.ToString) _
                                                   + "&formTableName=" + GeneralFunctions.encryptQueryString(task.FromTableName.ToString) _
                                                   + "&taskID=" + GeneralFunctions.encryptQueryString(task.TasksID.ToString) _
                                                   + "&creator=" + GeneralFunctions.encryptQueryString(task.Creator.ToString) _
                                                   + "&approvalNumber=" + GeneralFunctions.encryptQueryString(task.ApprovalNo.ToString)

Here is the preview.aspx.vb

VB.NET:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            'Decryption
            Dim EformID As Guid = New Guid(GeneralFunctions.decryptQueryString(Request.QueryString("formID").Replace(" ", "+")))
            Dim EformType As Integer = Integer.Parse(GeneralFunctions.decryptQueryString(Request.QueryString("formType").Replace(" ", "+")))
            Dim formTableName As String = GeneralFunctions.decryptQueryString(Request.QueryString("formTableName").Replace(" ", "+"))
...

In preview.aspx.vb i need all of those parameters in the querystring.

Any ideas?

Thanks in advance.

Best regards
 
Hi,

Eventhough when there is NO encryption (removed all encryption) it still gets the same error??? Is it because of authentication or something?
 
Back
Top