asp.net

Add attachements and pictures on ASP.NET

Through the website, I need to allow the user to add attachments and store them. And also add pictures and display and store them. ...

RegisterExpandoAttribute

I still don't get RegisterExpandoAttribute very well after checking out some articles about it which were lame examples at best. What I am trying to do is I have a class (a custom control). I have a couple properties in that class that can be set from code-behind. And I have a method that will spit out a JavaScript method. Based on t...

ASP.net list of dropdownlists - similar to Access continuous form

Hi there, What I'm looking for is a way to mimic the MS-Access style continuous form within asp.net. In one particular case, I want a control, bound to a datasource which returns a dropdownlist for each row, bound to the value within the datasource. Any change to any of the dropdownlists' would perform an update to the database insta...

Why print button always showing when cursor on an image tag in my web page

I'm have an .aspx page done with Vb.net and the buttons "Save Image" "print image" "Send image" is showing when I put the cursor on one of the images tag. I say one image because it doesn't appear on the other images tags. I don't want these buttons! ...

When downloading a file using FileStream, why does page error message refers to aspx page name, not file name?

After building a filepath (path, below) in a string (I am aware of Path in System.IO, but am using someone else's code and do not have the opportunity to refactor it to use Path). I am using a FileStream to deliver the file to the user (see below): FileStream myStream = new FileStream(path, FileMode.Open, FileAccess.Read); long fileSi...

Getting the MAC address of the remote host

I just a moment ago saw a request for finding the MAC adress of a remote host. An answer was that the MAC address is always sent as part of the TCP/IP protocol. How would I go about retrieving this information from an ASP.NET C# application? See: Reference to sister-post ...

Java and tomcat vs ASP.NET and IIS

Until recently I'd considered myself to be a pretty good web programmer (coming up for 10yrs commercial experience on a variety of e-commerce, static and enterprise applications). I'm self taught and have always used the Microsoft product stack (ASP, ASP.NET)... My applications are always functional, relatively bug free, but have never...

How to prevent ASP.NET from removing items from cache

Hi, I want to permanently add an item to the cache. I am using the following syntax: HttpContext.Current.Cache.Insert(cacheName, c, null, Cache.NoAbsoluteExpiration, Cache.NoSlidingExpiration); I have found out, that ASP.NET still sometimes removes items from the cache. Any ideas on how to prevent this (in addition to dropping the c...

Invalid callback or postback error in IE

I am having a problem with IE throwing an error when using update panels and forms. Everything works fine except I have a "Reset" Button that clears all the form fields using javascript and then should update the panel (with the blank search terms). Firefox doesn't have a problem with this, but IE is giving me a Invalid callback or pos...

Is it possible to decode EventValidation and ViewState in ASP.NET?

How to decode the ASP.NET EventValidation and ViewState? ...

Page_Unload not firing when using response.redirect(somepage,true)

I'm closing a WCF endpoint in the page_unload of an asp.net page, when using response.redirect() the page_unload event doesn't fire and i'm ending up with ophanned endpoint references. I thought the page_unload should fire everytime. Anyone shed any light. Thanks ...

How to control elements on a asp.net master page from child page

I have a few pages on my asp.net website that I would like to turn off a control on the master page. Is there a way to communicate with the master page from a child page? ...

Is there a way to nest (or escape) ASP.NET inline code inside HTML angle brackets?

is it possible to do something like the following in ASP.NET: <tr<%= index++ % 2 == 0 ? " class=\"alt-row\"" : ""; %>> in other words, is there a way to escape the angle brackets for the inline code block or something? (i know the alternative is: <% if (index++ % 2 == 0) { %> <tr class="alt-row"> <% } else { %> <tr> <% } %> ...

How can I stop images from being cached -OR- how can I check that a file exists on the server?

My site loads images based on names that are created for them. It loads images assuming that they're there when sometimes they're not. Every time it loads an image like this: <img src="/myimages/my-image.jpg" alt=""/> if it's not there on the server, it seems to cache that there wasn't an image there, so next time I load up the same i...

Save a WAV file to disk

This is a web service call which I wrote that is intended to receive a WAV file via a POST and store it in the web-app server's local file system (IIS). Is there a simple method to store the file and if so would someone be so kind as to provide a C# example? ...

Connecting an ASP.NET application to QuickBooks Online Edition

I am trying to create an ASP.NET page that connects to QuickBooks Online Edition, read a couple of values, and display the results. So far I have downloaded the QuickBooks SDK but I have been unable to find a simple step-by-step example on how to create an asp.net page to connect to QuickBooks Online. The QuickBooks SDK documentation a...

aspx page to redirect to a new page

What is the code required to redirect the broweser to a new page with an ASPX page? I have tried this on my page default.aspx : <% Response.Redirect("new.aspx", true); %> or <%@ Response.Redirect("new.aspx", true); %> And these result in a server error that is undetermined. I cannot see the error code because the server is not i...

Send a file from a web page in Outlook

I have a web page that displays a list of documents stored on the web site. I need to add a link next to each document that can e-mail it. By that I mean attach the entire document to the e-mail. When clicking the e-mail link, a 'New Message' window needs to display with: Subject line filled in with the title of the document (displaye...

How to access client's outlook in ASP.net?

What I want to do with my app is accessing client's outlook, getting some data, using them to get more data from the database, and then make a file ready for blackberry to sync. All of these are better done on the server, so at the clients' end, there is only one file with everything ready, so they can easily sync it. I have searched a l...

IIS VS 2008 / Web.config - wrong date format

Hi there, can anyone help. I have recently moved servers, its IIS7 rather that our previous IIS6 but everything else is the same, i have set the region to the UK and all date formats plus system local .. I mean everything .. But when a webpage asp.net is running on IIS7 it thinks the dates are another format.. This is really puzzling ...