Javascript and session variables

前端 未结 5 1401
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-21 08:28

I have a database that stores events in it and a page with a calendar object on it. When rendering the days it looks through the months events and if any match the current d

5条回答
  •  长情又很酷
    2020-12-21 09:06

    You definitely need to add a variable to the target page. But I take it that you are doing a popup scenario, so you should be able to create a javascript function OpenWindow() and fire it off when the user clicks the link.

    
    

    On the server side you need to build the call to the OpenWindow function. For example:

    onclick="OpenWindow(eventId=" + row["eventId"].ToString() + "&editMode=" + editMode.ToString() + ");"
    

    So in other words, prep everything on the serverside to set your javascript to post all variables to the new page. Hope this helps.

提交回复
热议问题