Profile Picture

Full postback from NDrawingView mouse click event in asp?

Posted By Christopher Smith 13 Years Ago

Full postback from NDrawingView mouse click event in asp?

Author
Message
Christopher Smith
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 3, Visits: 1
Have a pretty difficult question for my first post on here. Just to warn you, I am new to Nevron so it may be that the answer to this is actually quite simple. Basically, what I am trying to do is use an NDrawingView interactive map (which I already have) to modify other parts of the page. The problem I am running into is that the eventhandler for mouse clicks on NDrawingView is "OnAsyncClick", which does a callback only on the map. Anything else on the page that gets modified is not posted back and therefor isn't reflected on the screen.

For simplicity's sake, I'm just looking for an example that modifies a label based on the NDrawingView being clicked. The example below will run the code to modify the label, but will not reflect that change. It will only reflect changes to the map (for instance, if I say to change the NDrawingView image based on a click position, it will do that just fine. It just won't change anything that isn't in the NDrawingView control).

NOTE: Had to remove brackets on my asp controls since the forum here seems to use them. Just know that they exist =D

ASP Controls:

asp:Content ID="Content1" ContentPlaceHolderID="MainContentHolder" runat="server"
ndwc:NDrawingView ID="NDrawingView1" runat="server"
Height="350px" AjaxEnabled="True"
AsyncCallbackTimeout="10000" AsyncRequestWaitCursorEnabled="False"
OnQueryAjaxTools="NDrawingView1_QueryAjaxTools"
OnAsyncClick="NDrawingView1_AsyncClick"
AsyncAutoRefreshEnabled="True">
/ndwc:NDrawingView


asp:Label ID="Label1" runat="server" Text="" ForeColor="Red"> /asp:Label



C# codebehind:

protected void NDrawingView1_AsyncClick(object sender, EventArgs e)
{
//Do Some Stuff
Label1.text = "IT WORKED!";
}



Any help would be greatly appreciated!

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hello Christopher,

You can take a look at the following example in the Diagram: http://examplesaspnetdiagram.nevron.com/Frames/NExampleFrame.aspx?ExampleUrl=Examples/DemoDiagrams/NOrgChartUC.ascx



Best Regards,
Nevron Support Team



Christopher Smith
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 3, Visits: 1
Awesome, that is almost exactly what I needed. One question though: is there a way to do this exact thing using codebehind? Either C# or VB. I'm trying to access the currently selected shape file on a Nevron map in this fashion. Right now they click a shape and that shape is highlighted. I'd also like to pull the name of that ship into a table, text box or something else.

Nvm, found the solution! Thanks for the example!



Similar Topics


Reading This Topic