brimble2010 0 Newbie Poster

Hi all,

I am currently developing a webpart that works as a submit for many web parts at once.

When the Submit button is pressed, it sets a session variable and then when the page is realoded, each form on the screen responds to this and calls their own Submit functions.

For somereason when trying to turn these variables off again (in RenderWebPart) I get a SP error that says that there is a problem with the webpart (No other information given).

The reason that the variable is turned off in RenderWebPart is so that all webparts can call their submit function in OnPreRender and then the variable is turned off when I know all have completed their submits.

Here is the code for the RenderWebPart function, I was wondering if anyone could help point me in the right direction for solving this issue.

Protected Overrides Sub RenderWebPart(ByVal output As HtmlTextWriter)

        EnsureChildControls()

        Me.Page.Session.Item("GlobalClear") = "Off"
        Me.Page.Session.Item("GlobalClose") = "Off"
        Me.Page.Session.Item("GlobalVerify") = "Off"
        Me.Page.Session.Item("GlobalSubmit") = "Off"

        MyBase.RenderWebPart(output)

        If mstrNextPage <> "" Then
            Me.Page.Response.Redirect(mstrNextPage)
        End If

    End Sub

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.