Base solution for your next web application

Activities of "elmogallen"

Answer

So maybe to answer my own question, or to add some more details to the question...

It seems that the way this works is that you must create a user in ASP.NET Zero with the same username as the one in ADFS, and then it just magically works? And you can login with your network credentials?

That's what it seems like.

Dave

Question

I've noticed that if I leave an asp.net zero page open for awhile, then come back to it, the page won't work. Anything that tries to access data fails. I get errors like "Input null" and so on. Refreshing the page makes everything work again.

How can I either:

  1. Prevent this from happening? (What exactly is timing out?)
  2. Automatically log the user out after x minutes of inactivity.

Thank you, Dave

Answer

That helped me. Thank you.

For future reference for others, this is how to do it using the Metronic theme and angularjs:

<div class="md-radio-list">
    <div class="md-radio">
        <input type="radio" id="RetailerOptionRadio1" name="RetailerOptionRadio" class="md-radiobtn" ng-model="vm.coupon.retailerOption" value="1">
        <label for="RetailerOptionRadio1">
            <span class="inc"></span>
            <span class="check"></span>
            <span class="box"></span> Option 1
        </label>
    </div>

    <div class="md-radio">
        <input type="radio" id="RetailerOptionRadio2" name="RetailerOptionRadio" class="md-radiobtn" ng-model="vm.coupon.retailerOption" value="2">
        <label for="RetailerOptionRadio2">
            <span class="inc"></span>
            <span class="check"></span>
            <span class="box"></span> Option 2
        </label>
    </div>

    <div class="md-radio">
        <input type="radio" id="RetailerOptionRadio3" name="RetailerOptionRadio" class="md-radiobtn" ng-model="vm.coupon.retailerOption" value="3">
        <label for="RetailerOptionRadio3">
            <span class="inc"></span>
            <span class="check"></span>
            <span class="box"></span> Option 3
        </label>
    </div>
</div>
Question

In this framework, how do you do a simple radio button list?

Example: <a class="postlink" href="http://www.cssscript.com/wp-content/uploads/2014/07/Google-Material-Design-Animated-Radio-Buttons-with-Pure-CSS3.jpg">http://www.cssscript.com/wp-content/upl ... e-CSS3.jpg</a>

How would I accomplish that using ASP.NET Zero? I'm having a hard time. A normal radio button won't show up for me, and I'm struggling a bit. I'm not sure how to make it work in angular/bootstrap/metronic.

Could you give me an example?

Thanks, Dave

Answer

That worked perfectly. I didn't realize I could just call arbitrary jquery. I thought I had to use angular directives or something.

Thanks! Dave

Answer

So I've been goofing around and I was able to add Bootstrap Select, following the same pattern as Bootstrap Switch, then I added the js and css to the AppBundleConfig and used the syntax shown on another post here to add the ui-jq="selectpicker" attribute to my <select>.

So, I got it showing up and that's all good, except now it only seems to work if my options are static. If I try to get them using the angular model, I'm thinking that it is trying to convert it to the selectpicker before it has the data available.

<select id="PromotionId" name="PromotionId" class="form-control" ui-jq="selectpicker" data-live-search="true" ng-model="vm.coupon.promotionId" required uib-popover="Must be setup in the Credit Buy Down system first." popover-title="Promotion" popover-placement="right" popover-trigger="mouseenter" popover-append-to-body="true">
    <option ng-repeat="option in vm.promotions" value="{{option.id}}">{{option.name}}</option>
</select>

... in the js: ...
                couponMaintenanceService.getPromotions().success(function (result)
                {
                    console.log("success");
                    vm.promotions = result.items;
                });

How can I tell the selectpicker to update itself?

Answer

Also, as a follow-up question. How can I integrate Bootstrap Select if I have an older version of ASPNetZero before it was available. I can't quite figure out what all I need to do because there have been so many changes. I tried upgrading, but it didn't go smoothly.

Dave

Question

I'm having a hard time understanding how to use Bootstrap Select in my SPA ASP.NET Zero application. Can you give an example?

This is not working:

<select name="repeatSelect" id="repeatSelect" ng-model="vm.coupon.promotionId" class="selectpicker">
    <option ng-repeat="option in vm.promotions" value="{{option.id}}">{{option.name}}</option>
</select>

Do I need to do anything else?

Thanks, Dave

Should I also remove DealerKioskId from my DealerKioskSettingsListDto ? Do I need to override Id there or do anything, or will it just be handled correctly at that point?

Thanks, Dave

Or, are you saying I should override Id and keep DealerKioskId as well?

Showing 1 to 10 of 14 entries