Appending Data to a <div> tag with .NET

So i have the following situation in my html file:

<div id = "imagePreview">
    <div id = "earlyDetectionPlots">
        <div id = "earlyDetectionScoreMetricsPlots">
        <div id = "earlyDetectionVariableMetricsPlots">
        <div id = "earlyDetectionPseudoStandardizedCoefficientPlots">

I have a jQuery function as follows:

        $(document).on('click', 'a[data-link]', function () {
        var $this = $(this);
        url = $'link');
        $("#imagePreview").load("imageProcess.aspx?" + url);

where url has GET parameters in the form of something like m=2k01&type=EarlyDetection etc.

In my imageProcess.aspx file, I'm using regular expressions to grab a bunch of images from a folder.

However, each of the divs above are going to have different data in them. I know how to decide which images go where, but I don't know how to use c# to say something like #earlyDetectionScoreMetricsPlots.append("image.png"), since I don't want to append the images directly to imagePreview but rather to the sub div within it, and as far as I know, I can't use jQuery within the imageProcess file.

(I think there might be a way to call specific functions within the imageProcess.aspx file corresponding to the different <divs>, but I don't know how to do that with jQuery). Any help would be much appreciated.


You either need more complex jQuery or return the actual content you want in #imagePreview from imageProcess.aspx

Need Your Help

add migration failed when DbContext in sperate project

c# entity-framework migration

I have a project with different layers: web, services, model, data each one has a different project in the same solution. The application, compiles and runs OK. But when I tried to implement migrat...

Branching and Merging Strategies

version-control tfs merge visual-sourcesafe branch

I have been tasked with coming up with a strategy for branching, merging and releasing over the next 6 months.