iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I'm using the __EVENTARGUMENT variable to determine several actions in the Page_Init event of my page:
Dim argument As String = Request.Params.Get("__EVENTARGUMENT")
However this variable contains info about the Action (e.g, SelewctodeChanged) AND an "NodeInternalID".
What is this? And how can I use it to get more info about the node for example out of the collection in .Nodes.
I tried setting different things like .Value . DataItem .Tag etc in the creation phase of ht enodes without success...
Thank you
Hello Matt,
It is not a good practice to use EVENTARGUMENT variable for page processing, because the variable is intended only for control developers to manage the control's life cycle during postback.
If you would like to get information about a node during certain event, try to check the event parameter provided in the event parameter.
For example, you can get the current node during DragDrop event by accessing e.Node. See following snippe
protected void WebTreeView1_DragDrop(object sender, ISNet.WebUI.WebTreeView.WebTreeViewDragDropEventArgs e) { string text = e.Node.Text; }
Hope this helps,James.
Hi James,
I'm aware of the character of the __EVENTARGUMENT. The thing is I load user controls dynamically and therefore I need to initialize them in the Page_Init event of the page because otherwise (for example when I would do this in Page_Load or later) the event wiring up of that user control would not work anymore.
When I would use your solution and I already tried it in NodeSelectChanged its the same problem: Its AFTER Page_Init.
Also another issue is that it seems when you use LoadOnDemand the Nodes collection is always empty? I can at no stage get any node back from the TreeView. Not before and not after Page_Load??
THank you.
Hi Matt,
I see. In this case, I suggest you to better pass the information you need in a separate hidden input, rather than relying on EVENTARGUMENT variable.
For instance, if you need to know the selected node in TreeView and obtain the information in Page_Init, you can assign the information to a hidden input field in client side prior to the postback. That way, you can access the data you need through Page.Request["AdditionalInfo"].
Hope this helps.
thanks for that solution. Can you tell me how that javascript code would look like? Would I have to modifiy the doPostBack function?
I made it. I can set values of hidden fields now by javascript and use these in Page_Init.
THanks
Matt, glad to hear that you made it
- James
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname