c#
How to restrict file type in FileUpload control
Is it possible to allow the fileupload control to show only images?
ASP.NET GridView: How to edit and delete data records
Hi I have used gridview to create a table.
Is there a way to implement edit and delete.
I have done it in PHP before. The method I would like to use is create two more columns in the table with edit and delete buttons on each row. Then when the buttons are click it passes the ‘id’ through the URL and able to edit or delete. Not really sure how to do this in asp.net webforms. Below is my code for the table. Thank you.
GoogleWebAuthorizationBroker.AuthorizeAsync Hangs
Our website needs to upload videos to youtube from the code behind (asp.net mvc application). I’m trying to get the google credentials, but when i call the AuthorizeAsync, the application just hangs. I’ve looked all over for a solution and none seem to help out. I’ve already searched for the obvious on google and stack overflow. most of what i found mentioned that the application might not have access the the appdata folder, so i tried changing the folder to be in the c drive, d drive and in the actual inetpub location. i tested and found i was able to have the application write to those locations.
How do I get the currently loggedin Windows account from an ASP.NET page?
I have an ASP.NET 3.5 application that uses ASP.NET forms authentication. I want to be able to get the Windows user name currently logged into the computer (NOT logged into the ASP.NET application, but into Windows) when data is edited in a page.
Fancybox – ASP.NET button not working
I’ve just determined using Firebug that when Fancybox window is created it actually takes all of my ASP.NET controls (contained in DIV tag) and puts them outside FORM tag. So I guess this is the reason why then ASP.NET button doesn’t do anything – it is placed outside form.
Is there a way in Json.NET serialization to distinguish between “null because not present” and “null because null”?
I’m working in an ASP.NET webapi codebase where we rely heavily on the automatic support for JSON deserialization of message bodies into .NET objects via JSON.NET.
Check if Cookie Exists
From a quick search on Stack Overflow I saw people suggesting the following way of checking if a cookie exists:
Convert IHtmlContent/TagBuilder to string in C#
I am using ASP.NET 5. I need to convert IHtmlContent to String
How to force BundleCollection to flush cached script bundles in MVC4
… or how I learned to stop worrying and just write code against completely undocumented APIs from Microsoft. Is there any actual documentation of the official System.Web.Optimization release? ‘cuz I sure can’t find any, there’s no XML docs, and all the blog posts refer to the RC API which is substantially different. Anyhoo..