asp.net

Can you get a DataTable from an ObjectDataSource?

Hello, If I have an ObjectDataSource defined at design time, can I get a DataTable from that ObjectDataSource at runtime? I have a method that returns a DataTable that I am using for the Select method property of the ObjectDataSource. ...

Do I need to enable a Service Broker endpoint on SQL 2005 to use SQLCacheDependency?

Hi All, My question really has three related parts which I hope you can help me clear up - Do I need to enable a Service Broker endpoint on SQL 2005 to use the SQLCacheDependency mechanism? If so, is there a specific port that needs to be used? If neither of the web server machine and sql server are in a domain, what type of authentic...

Is it possible to detect if Microsoft Excel is installed from a Web Application

I'm working on a web app (ASP.NET) that has some features that require Microsoft Excel installed on the client. I'd like to disable those features if Excel is not present. Windows/IE/Excel only solutions are fine. This is not a multi-browser, multi-OS web app. Any clever JavaScript out there to accomplish this? ...

Can't Get ASP.NET MVC Form To Post

I am having problems getting my form to Post to my Save method in a controller. I am new to MVC, and have followed several examples to try to get this to work. Here is my html markup: <form action="Edit/Save" method="post"> <fieldset> <legend>Personal Information</legend> <table class="editGrid"> ...

Different ways of storing data in session state

I have been asked up to come up with a state management strategy for a ASP .NET / MVC C# 3.5 web app I have chose to go with storing sessions on a state server - this will be a separate physical box. I am concerned about the time that would be taken to serialize/deserialize objects when storing into sessions... Does anyone know of a...

Catching events from dynamically added ASP.NET User Controls

I have an ASP.NET web form which I am adding a variable number User Controls to. I have two problems: The User Controls are added to a PlaceHolder on the form in the first PageLoad event (I only add them when "(!this.IsPostback)", but then when the form is posted back, the controls are gone. Is this normal? Since other controls on t...

Hide a table column in a nested ListView

I have a ListView inside another ListView, and I'd like to hide a table column in the inner ListView whenever a particular parameter is passed. Given the setup below, how would I hide the ID column (both the header and the data) if the URL contains "...?id=no"? <asp:ListView ID="ProcedureListView" runat="server"> <LayoutTemplate> ...

How to create a "pass through" form / file POST to remote server in .NET?

I'm trying to post a file to a remote server and pass along some hidden values. So within my code I want to create a request to http://www.someotherdomain.com/upload.php and retrieve the xml results from that post. Thanks. ...

Change items in the LayoutTemplate of a nested ListView

This is related to my earlier question, but I thought I'd simplify it and make a challenge out of it. Given the code below, can you change the value of "ChangeThisLabel" from the code behind? <asp:ListView ID="OuterListView" runat="server"> <LayoutTemplate> <asp:PlaceHolder ID="itemPlaceHolder" runat="server" /> </Layout...

How do I build a search mechanism for my application?

It seems to be a common requirement nowadays to have a search feature that can search almost anything you want. Can anyone give me samples or tips as to how to go about building a one stop search for an application? For example: you have 3 tables customers, products, employees. The application has a master page that has a textbox at the...

check string for nothing and then for certain value in 1 line?

I always seem to see if a string (querystring value usually) has a value but first I have to check that it is not nothing first so I end up with 2 if then statements - am I missing somethign here - there has to be a better way to do this: If Not String.IsNullOrEmpty(myString) Then If CBool(myString) Then //code End If End If ...

ASP.NET Development Server - 403 Forbidden.

I'm setting up a new PC and I installed my project to work with. It is a .NET Remoting 2.0 application that uses the ASP.NET development server to host the server side while developing. I'm getting the following error when I make requests to the server: "The remote server returned an error: (403) Forbidden. " I've checked the credentia...

How to make a fully customizable hosted ASP.NET MVC application

This is related to my previous question regarding serving static html files but that doesn't seem to be a good solution, I want to make a fully customizable ASP.NET MVC application as a hosted service. See allowing the user to customize the look/feel of their own page but it is still dynamic, meaning the data is hosted in the central d...

Posting xml with ServerXMLHTTP timeout

I'm working on two websites. One is an existing classic asp site which posts xml to a new asp.net (.net 3.5) website. The classic asp site is using msxml's serverxmlhttp object in vbscript to send this xml over. The whole thing works until I make a seemingly unrelated change to the asp.net site. When I add a few lines of code that us...

Xml tool to test xml data

Hi guys, I'm in a project that loads a lot of XML from web services and I need to send the correct one and get the one I am expecting, a part that run the web app in Debug mode and add a breakpoint after getting the XML String, what can I have as a free plugin or even a trial program to let me see what XML is sending by my web applicati...

How to post a file to an image hosting service in .NET?

Scenario: localhost receives the current HttpRequest with 3 hidden inputs and a posted file. I must then forward this form data to an external image host and get the response. ...

ASP.Net application slow to load - VS2008

This is my set up on a stage server compiled my web application published website copied the output directory from my machine to stage server created domain account created virtual site on a static IP website runs under domain account created impersonate set too true as windows integrated authentication is used with sql server No...

Does anyone beside me just NOT get ASP.NET MVC?

I've been fiddling with ASP.NET MVC since the CTP, and I like a lot of things they did, but there are things I just don't get. For example, I downloaded beta1, and I'm putting together a little personal site/resume/blog with it. Here is a snippet from the ViewSinglePost view: <% // Display the "Next and Previous" links ...

web.config in nested folder

Hello All, I am trying to install an app inside of another web app. I have my .aspx pages and some code that I was putting into the main app's app_code folder. I've added my own web.config file for my connection string and such but I think there's a conflict. So my question is a two parter. First, what is the best way to install an app ...

Access control to web service

This is what I wish to achieve: My ASP.NET web service is hosted on a server called //service. I want to control access to the web service by server and by application as well. What I mean here is if I have two ASP.NET web applications (app1 and app2) hosted on a server called //web1 and I only want //web1/app1 to be able to call the we...