Subscribe: Web Forms
http://forums.asp.net/rss.aspx?ForumID=18
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
client  data  delete  dialog  error  file  message  net core  net net  net  new  page  server  view  web  webclientprint net 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Web Forms

All Forums



All Forums



Last Build Date: Tue, 24 Jan 2017 11:43:31 -0800

 



CSS for table

2017-01-24T15:52:48.123-08:00

There are 8 columns in a table.

Column 1,3,5,7 will store label and column 2,4,6,8 will store text box.

How to set CSS so that label width=100px and text box width=80px?




VB.net auto scroll

2017-01-24T18:55:11.14-08:00

I found this:

load-data-dynamically-on-page-scroll-using-jquery

But what i want is the page to auto scroll, when it hits the bottom, get new data and reload the page and then repeat.  I copied this code and have NO jQuery or JS experience so any help is greatly appreciated.

thanks,




smtp server

2017-01-24T13:43:23.743-08:00

Can someone point me to some good links which explain how SMTP server sends email...all at once or one by one or how does it work...




how to call a webservice live betting odds feed using angular

2017-01-24T19:07:38.483-08:00

Hi guys currently been having this challenge where we have been supplied with a url that returns json data. The client requires and iframe more like (SPA)Single page application just to view current playing betting events matches similar to this below..

http://www.valuechecker.co.uk/football/english/barclays-premier-league-76/southampton-v-leicester-284313/

my approach was to use angular  as this will have to update the data without refreshing the page.

here is the link provided which returns data in json

http://livesvc.supabets.co.za/data/json/MenuSx.aspx?idBook=53&idPal=1&idLang=2&IDGmt=48&mode=0&oddsformat=4&ver=&preload=true%22;

The problem is that im not deeply familiar with angular so im still trying to understand its syntax. I have this conde which i already implemented

heres my controller code

var app = angular.module('booksInventoryApp', []);

app.controller('booksCtrl', function ($scope, $http) {

    $http.get("http://livesvc.supabets.co.za/data/json/MenuSx.aspx?idBook=53&idPal=1&idLang=2&IDGmt=48&mode=0&oddsformat=4&ver=&preload=true%22;")
      .then(function (response) {
          $scope.data = response.data;
      });
});

and my html page markup




    
   
    


    

{{Event.Tournament}}

how can i display the data based on this scenario?

kind regards

Tony




When Using the f-12 view in chrome and you mod values in the style tab... is there a way to easily find that bootstap item in the actual CSS file to change?

2017-01-24T16:36:58.71-08:00

Hi All,

So I was shown this nifty chrome f-12 option while working in MVC. As originally I was using IE and I guess IE does not have the option. 

Anyway I see you can change values in the style tab... is there anyway to see what line in the CSS file the item you want to change is so that

you can find the line in the css file and make the change permanent?

Thanks in advance!




Why WCF RIA service created

2017-01-22T17:51:35.413-08:00

Why WCF RIA service created for silverlight. Why can't we use WCF. What is the additional benefit WCF RIA service is giving?




serialization related question

2017-01-22T03:11:54.22-08:00

Hi,

I have created sample Web API 2.2 with outh 2.1 and i have decorated my class with [DataContract] attribute and properties inside the class with [DataMember] attribute. is this enough to say that i am serializing data? How do i check that data is serialized? For example, if the run my API project and access any method using google POST MAN i am able to see the result. but how do i confirm that data is serialized?  Any help to understand how this works please




Simple HTTP error message to API client

2017-01-24T10:43:43.437-08:00

Hi

I want to make a very very simple Unauthorized 401 error back to my API client from my WEB API but I simply cannot figure it out.

I am getting error messages whatever I try and I have googled for some time but all threads are way overkill for what I want.

I just want something very simple like below but it tells me HTTPResponseMessage cannot be used by a method, so how do I return a simple 401 back to the client without having to use exception filters and middleware, yes I do understand those are preferred methods but this is a learning excersise for me so please humor me with a simple way of doing it directly in the web api controller.

if (ApiKey != "FooBar")
            {
                return HttpResponseMessage(Unauthorized);
            }




Overcoming Disadvantage Of Transport Security In WCF

2017-01-24T18:11:32.54-08:00

I understand that Transport security in WCF has the disadvantage of only securing messages when the communication is point-to-point.

If the message is routed to one or more intermediaries such as a router, the message itself is not protected once an intermediary reads it from the wire.

What are some ways to overcome this issue for a Restful WCF Service that implements security using Transport security and  SSL?




WebClientPrint 3.0 for ASP.NET CORE released! New Raspberry Pi printing support! RAW Data and known file formats client printing.

2017-01-24T18:08:11.69-08:00

We’re glad to announce the release of WebClientPrint 3.0 for ASP.NET CORE

WebClientPrint for ASP.NET Core is a lightweight and plugin-free solution for Client-side Raw Data Printing scenarios for Windows, Linux, Raspberry Pi & Mac clients, exclusively designed for ASP.NET Core MVC projects. With WebClientPrint solution, you can easily send raw data, text and native commands as well as known file & document formats to printers installed at the client machine without showing or displaying any print dialog box!

Getting Started with WebClientPrint 3.0 for ASP.NET CORE




FtpWebRequest Not Working in .Net 2.0

2017-01-22T17:14:43.58-08:00

bellow code working fine in .Net 4.0 but not working in .net 2.0. 

in .net 2.0 i got this error : The remote server returned an error: (501) Syntax error in parameters or arguments. 

Any one can you please help on this?

Dim request As FtpWebRequest = DirectCast(WebRequest.Create(New Uri(ftpDirectoryPath)), FtpWebRequest)
request.Proxy = Nothing
request.UsePassive = False
request.UseBinary = False
request.KeepAlive = True
request.Credentials = New NetworkCredential(userName, password)
request.Method = WebRequestMethods.Ftp.DownloadFile

Dim reader As Stream = request.GetResponse().GetResponseStream()

Thanks,




Security context of an application

2017-01-24T17:41:21.44-08:00

Hi 

What is the security context of an application?




Application how know which Web config file have to use when we have multiple web config files in root directory.

2017-01-24T17:27:00.407-08:00

In Visual studio how application knows which web config file is used to application setting when execution starts.
When we have multiple web config files in root directory.




Displaying Local Weather conditions on an asp.net web page

2017-01-24T17:18:04.933-08:00

I have a asp.net web page where I would like to display the current weather conditions based on the current zip code (which I am obtaining from a web service). I am using VS 2015 with C# code behind. Does this have to be done using a web service or is there another way to do it? I would just like to obtain the temp and conditions and assign it to id fields in css.

Any examples would be appreciated.

Thanks.    




"the type xx exists in both" after migration to csproj (Visual Studio 2017 RC)

2017-01-20T10:30:01.267-08:00

Hello everybody, I start migrating my "old" .net core web app from vs.net 105 to vs.net 2017 rc...and the problems begin! In "old" xproj version my class libraries were built again net451, net46 and net461 frameworks : here is the project.json file: {   "version": "1.0.2.0",   "description": "XXX",   "authors": [ "Administrator" ],   "packOptions": {     "tags": [],     "licenseUrl": ""   },   "frameworks": {     "net451": {       "frameworkAssemblies": {         "System.Runtime": "4.0.10.0"       }     },     "net46": {       "frameworkAssemblies": {         "System.Runtime": "4.0.20.0"       }     },     "net461": {       "frameworkAssemblies": {         "System.Runtime": "4.0.20.0"       }     }   },   "dependencies": {     "Microsoft.ApplicationInsights": "2.3.0-beta1",     "Microsoft.Rest.ClientRuntime": "2.3.4"   },   "buildOptions": {     "compile": {       "include": [         "../../../Tracing/*.cs"       ]     }   } } After migration i get a lot of build errors all like this: Severity Code Description Project File Line Suppression State Error CS0433 The type 'HttpClientHandler' exists in both 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Net.Http, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' WebApiServiceClient(net46), WebApiServiceClient(net461) If I build against a single framework (change TargetFrameworks to TargetFramework  and use for example net451) it works. Here is the csproj after migration:       XXX     1.0.2.0     Administrator     net451;net46;net461     win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64     XXX     false     false     false             (embed)     (embed)               <[...]



MVC details and View How to display descriptive values on the form vs the ID values that have been stored in the database table.

2017-01-11T19:40:08.98-08:00

Hi All,

I tired to explain this in another thread and I don't think I did a good job... I will try to explain with pictures... which may better show what I am trying to achieve

as it may not be possible given mvcs many limits...

Also See this Guy asked the same thing I am trying to ask... The solution provided talks about view model... but like all of these help answers they assume you are working with only one item at a time... the index is attached to data already...which is the main result table.

http://stackoverflow.com/questions/11540444/mvc-3-how-to-display-a-lookup-value-in-a-view-index-view-instead-of-an-id-fiel 

See(image) info graphic.




problem with search

2017-01-24T15:01:11.39-08:00

hey everyone i have issue about doing search

when i request search it's give me my search and all element that not contains on search

so how can i make it request only search word without other element that not contains search word?

public ActionResult Search(string NameSearch,int page = 1)
        {
            ListView model = new ListView
            {
                items= Repository.items.Where(c => c.name.Contains(NameSearch)).OrderBy(u => u.Id).Skip((page - 1) * size).Take(size),
                pageinfo = new pageinfo
                {
                    Currentpage = page,
                    ItemPerpage = size,
                    Totalitem = Repository.immovables.Count()
                }
            };
            return View(model);

        }




View Model classes not updated in azure

2017-01-24T17:03:35.333-08:00

My site is down now as I have updated RegisterViewModel and tested it locally and it worked fine. I added a new field 'Notifications'
however after publishing to azure my site crashes with the following error:

'RegisterViewModel' does not contain a definition for 'Notifications'

More details here:

An unhandled exception has occurred: One or more compilation failures occurred:
3cmgspbk.ncu(571,3721): error CS1031: Type expected
3cmgspbk.ncu(571,3935): error CS1031: Type expected
3cmgspbk.ncu(571,3777): error CS1061: 'RegisterViewModel' does not contain a definition for 'Notifications' and no extension method 'Notifications' accepting a first argument of type 'RegisterViewModel' could be found (are you missing a using directive or an assembly reference?)
3cmgspbk.ncu(571,3991): error CS1061: 'RegisterViewModel' does not contain a definition for 'Notifications' and no extension method 'Notifications' accepting a first argument of type 'RegisterViewModel' could be found (are you missing a using directive or an assembly reference?)
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException: One or more compilation failures occurred:




Failed to load resource: the server responded with a status of 500 (Internal Server Error)

2017-01-24T15:54:40.533-08:00

Hi

 I am getting this error : Failed to load resource: the server responded with a status of 500 (Internal Server Error) - http://localhost:15093/BookCa

function Delete(Id) {
    //alert(Id);
    $("#delete-dialog").dialog({
        modal: true,
        closeOnEscape: false,
        width: 400,
        title: "Confirm",
        buttons: {
            Continue: function () {
                $.ajax({
                    url: "/BookCategory/Delete/" + Id,
                    //url: "BookCategory/Delete",
                    //data: '{Id: ' + Id + '}',
                    type: "POST",
                    dataType: 'json',

                    success: function () {
                        if (confirm("Are you sure you want to delete !") == true) {
                            alert("Data Deleted successfully");
                        } else {
                            alert("You have canceled the changes");
                        }
                        //alert("Data Updated successfully");    
                        $dialog.dialog('close');

                        })
                    },

                    error: function () {
                        $('#msg').html('
Error ! Please try again.
'); } }); $(this).dialog('close'); }, Close: function () { $(this).dialog('close'); } }, }); } Controller [HttpPost] [ValidateAntiForgeryToken] public ActionResult Delete(int Id) { bool status = false; string message = ""; var v = db.BookCategories.Where(a => a.Id.Equals(Id)).FirstOrDefault(); if (v != null) { db.BookCategories.Remove(v); db.SaveChanges(); status = true; //message = "Successfully Deleted!"; } else { return HttpNotFound(); } return new JsonResult { Data = new { status = status, message = message } }; }


tegory/Delete/1003

Thanks




What we can do with date and time offset data

2017-01-24T14:43:15.943-08:00

see here we store offset. so tell me what is the importance of storing offset data along with date and time ? what we can do with offset data if we store ? public void DemoDateTimeOffset() { DateTimeOffset offsetValue = new DateTime(2017, 1, 21, 4, 34, 0); using (SqlConnection cn = new SqlConnection(myConnection)) { string commandText = @" INSERT INTO DateTimeDemo (DateTimeExample,DateTimeOffsetExample) VALUES (@DateTimeExample,@DateTimeOffsetExample)"; using (SqlCommand cmd = new SqlCommand(commandText, cn)) { cmd.Parameters.AddWithValue("@DateTimeExample", DateTime.Now); cmd.Parameters.AddWithValue("@DateTimeOffsetExample", offsetValue); cn.Open(); cmd.ExecuteNonQuery(); } } } [...]