Subscribe: Web Forms
Added By: Feedage Forager Feedage Grade B rated
Language: English
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


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? auto scroll


I found this:


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.


smtp server


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


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..

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;

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) {

      .then(function (response) {
          $ =;

and my html page markup




how can i display the data based on this scenario?

kind regards


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?


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


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



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



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


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.


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


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()


Security context of an application



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.


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 web page


I have a 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.


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


Hello everybody, I start migrating my "old" .net core web app from 105 to 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": "",   "description": "XXX",   "authors": [ "Administrator" ],   "packOptions": {     "tags": [],     "licenseUrl": ""   },   "frameworks": {     "net451": {       "frameworkAssemblies": {         "System.Runtime": ""       }     },     "net46": {       "frameworkAssemblies": {         "System.Runtime": ""       }     },     "net461": {       "frameworkAssemblies": {         "System.Runtime": ""       }     }   },   "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=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Net.Http, Version=, 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     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.


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. 

See(image) info graphic.

problem with search


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 => => 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


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)



 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) {
        modal: true,
        closeOnEscape: false,
        width: 400,
        title: "Confirm",
        buttons: {
            Continue: function () {
                    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");    


                    error: function () {
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 } }; }



What we can do with date and time offset data


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(); } } } [...]