I recently ran into a situation in which accessing session information from view is the most intuitive and quick solution to the problem. So, I just did it without thinking too much. But now when I revisit my code. I somehow feel uncomfortable about the decision I made earlier. I can't clear state what is wrong of doing what I did. Just ...
How do I restrict file types with the HTML input file type?
I have this
<input type="file" id="fileUpload" name="fileUpload" size="23" accept="Calendar/ics"/>
I am trying to restrict the type to only the iCalendar format type.
I also want to check it on the server side. How do I do this in ASP.NET MVC?
...
Hi
So is there some sort of built in checking in Dday iCalendar that checks the input stream of what they are uploading is a valid iCalendar format. I am not sure what happens if something is not in proper format or if it is like a jpg being uploaded instead but has an Ical extension.
...
Hello,
Recently i started making a item container, and every time the user tries to add an item into the container. If somehow the same item type exists, it'll stack them on top of each other, but there's a limit, which is int.MaxValue and if i tried:
if (2147483647 + 2147483647 > int.MaxValue)
That would give me the following error:...
Is there any library with functions for downloading files from the internet? I need to download some files using threads to increase speed.
...
I get a video feed (mpeg2-ts @ 500kb/s) over the network, but I'm uncertain on how to go from here.
The videofeed is now collected in a rather fast growing byte array, and I need a hint on how to feed a video renderer with these bytes. I've used DirectX's AudioVideoPlayback before, but as far as I can se it can only read from files, a...
I have three forms named frmBase(form1),frmGraph(form2) and frmBalloon(form3).
frmGraph(form2) opens if the user clicks on the button named btnShow placed on frmBase(form1).
frmBalloon(form3) opens if the user clicks on the button named btnShow placed on frmGraph(form2).
Now if the user clicks on the button named btnCancel placed on t...
Hi All,
I am developing an application in which I am trying to fetch Date, Time and Time Zone from single DateTimePicker control. Can anybody help to resolve this?
Thanks in advance.
EditV1: I am using .net framework 2.0. Now I am able to fetch Date and Time with Single DateTimepicker by setting its CustomFormat property as;
dtpicker2....
Is there any code like, frmBallloon is shown in btnShow click event of the frmBase and again I want to show frmBase if user clicks on the btnShow of the frmBalloon then there is two copy of the frmBase.I want only one copy.Then how can I alter the form view by clicking on the button.
...
A remoting application is hosted on server using IIS. I need code to check that the hosted application is running or not. Is any way? Please suggest.
...
I downloaded an example of the application based on the .NET RIA services from the article:
http://blogs.msdn.com/brada/archive/2009/07/22/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-6-poco-and-authentication-provider.aspx
from the "download the full demo files" link.
On my PC (MS VS 2008, SP1, NET ...
Check out the simple code below :
Public Class Form1
Private _items As List(Of String) = New List(Of String)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
_items.Add("Item1")
_items.Add("Item2")
_items.Add("Item3")
ListBox1.DataSource = _it...
Hi All,
We have developed an ATL smart device project for to save the web page locally in windows mobile device. The application uses native IWebbrowser2 ATL interface control to browse the web page and save the web page complete.
Now we need to have our UI and other user interface controls to be designed and developed using C# also ...
I am using a custom ControllerFactory (to use Castle Windsor's IOC to create controllers), and I notice it's getting requests to create a controller for "favicon.ico". I have put a favicon.ico file in my Content folder, but I'm still getting these requests.
How do I resolve this and serve static content without trying to create controll...
As I've learned the static objects in classes are constructed when the class is being referenced for the first time. However I'd find it sometimes usefull to initialize the statics when the program is being started. Is there some method (ie by using annotations) of enforcing it?
...
Problem
I'm trying to create an CUDA application that is well integrated with .net. The design goal is to have several CUDA functions that can be called from managed code. Data should also be able to persist on a device between function calls, so that it can be passed to multiple CUDA functions.
It is of importance that each individual...
I understand that managed threads are not guaranteed to run on the same OS thread.
If the CLR may switch a managed thread between OS threads, how often does this happen? What influence the frequency?
I've got a separate question on how to stop the switching from happening. Second prize for me would be for this to not happen too often (...
I have two forms first is frmBase and second is frmBalloon.I alter the focus of both forms that first frmBase is shown then frmBalloon is shown(frmBase is not visible)and then again frmBase is shown.Now I have need of event that occurs first frmBase loads and then again when it shows after frmBalloon becomes not visible.
So I have need ...
Hello,
i have one Listview in my Usercontrol & 1 objectdatasource binded with the ListView.
now in objectdatasource's Deletemethod i have taken businessobject as argument but at runtime i am not getting value in my businessobject's properties...
i also tried to use "Bind" instead of "eval" in ItemTemplate. but not getting any value at ...
Hi Experts,,,
I wanna have a base page for all my content editing pages with a save and delete buttons at the bottom.
is that possible? how?
if not, is there an alternative way?
I think master pages won't work because it's not a site wide page layout it's just for edit pages.
...