asp.net

facebook SDK roles management

is there a way to get the list of currently listed developers on a face book connect application i want to use this to validate if a user is authorized to sublmit new contenet and create events through the connect website or do i need to couple this with a forms authorization account to handle permissions or is there a better way over ...

Is there a way to retrieve the message body when the server returns a 500 internal Server Error?

I have a routine that submits a SOAP request using HttpWebRequest and WebResponse. If the SOAP Request fails the server sends back HTTP/1.1 500 Internal Server Error. When I trap the error I have yet to find a way to view the body of the reply which contains the fault code. Is there a way to retrieve the message body when the serve...

How can I make my webpage run JavaScript code when an ASP.net control is clicked?

I have a web page that uses the ASP.net Tree View web control. As the web page is currently programmed, when the user clicks on a node on the tree view, the page posts back and a C# function executes to handle the event. Can I make my web page run some Javascript code and not post back when a tree view node is clicked? Update: Suppos...

.net 4.0 inheriting .net 3.5 web.config?

I have a .NET 3.5 web site in IIS 6. I created a virtual directory to host a .NET 4.0 app. However, I'm getting all kinds of errors that point to the .NET 4.0 app processing items from the parent app's web.config file, even though I have it set up to be its own virtual directory. How can I stop this from happening? ...

ASP.NET web application project: how to copy a referenced DLL's dependencies to the 'Temporary ASP.NET Files' folder?

I have a web application project WAP that references class library CL. CL needs some xml configuration files in order to work properly. In WAP's csproj, I add a PostBuildEvent to copy the necessary XML files to the TargetDir. When I build, the folder structure is good; the bin folder contains CL and the xml files. When I run the webse...

Will Crystal Reports XI Release 2 work with ASP.NET 4?

I want to upgrade an old ASP.NET application to ASP.NET 4.0. It uses several Crystal reports, all which rely on Crystal Reports XI Release 2. Will they work together? ...

Passing the value of a Textboxfor into ActionLink

Hi all, Having a little trouble and wondered if anyone could help :-) I am trying to pass the value that a user enters into a html.Textboxfor to an html.Action link. As shown below : <%=Html.TextBoxFor(m => m.OrderQty)%> <p class="button" > <%: Html.ActionLink("Add to cart", "AddToCart", ...

Ajax Div positioning

I have an aspx page with ajax panel on it and a button. this is my button : <asp:Button ID="Button1" runat="server" OnClientClick="javascript:SetValues()" onclick="Button1_Click" Text="Button" /> when I click on the button I call the SetValues() function on the OnClientClick event. this function will change the position of the div o...

multiselect from dropdownlist for web app?

I'm building a web app that will come back with a report. For certain parameters where the user has requested a dropdown list, they also want to be able to select more than one option at a time. e.g. show me all transactions from the states of TX, WV, and ID. The reason I've decided to go with the dropdownlist they requested and not a ...

How to obtain ALL e-mail addresses for a Google Account?

Hi there, I'm building a web application using DotNetOpenAuth to do the authentication with OpenId and Google Accounts. My web application should not allow just any Google Account; instead I will have a table storing some allowed e-mail addresses, and if the user logs in with an e-mail contained in this table the login will succeed. My...

WCF single vs multiple operations ?. design ideas.

We are developing a CRM application. All the business logic and data access go through WCF services. We have 2 options for communication between WCF and client (at the moment: ASP.NET MVC 2) One option is create method for each operations. Example GetCustomers() GetCustomersWithPaging(int take, int skip) GetCustomersWithFil...

Binding array + one object to Dropdownlist

I have an array of type Person, which contains string objects: FirstName, LastName, login. I have this bound to a dropdownlist. Now along with this array, I also want to display one more item called "Desk". How can i do that? My current code is: Person[] traders = GetTraders(); ddl_trader.Items.Clear(); ddl_trader.DataSource = trader...

What are some ways to secure a directory in ASP.NET?

Just need to secure the directory with possibly a prompt box or something. Sorry, i am nublariffic. ...

Restrict a method call to a specific page in a .net application (in C#)

Hei, I have a method from a class in a custom library which I would like to restrict to be called only on a specific page, somehow using conditional methods. The problem is that I need a return value and conditional methods do not allow return other than void or 'out' parameters. Using a void method it works fine, but is there a way to a...

easiest way to make only one column sortable

I have a datagrid with sorting. I set enable sorting to true, but that makes every column sortable. Is there a simple way to make it so that only one column header can be clicked for sorting? I feel like there should be a simple and quick fix for this, but who knows. some code: <asp:GridView ID="ProductsGrid" runat="server" ...

How to get clean/pure HTML from ASMX web service call

I am trying to use jQuery .load() to get straight html from a asmx web service: $('#target').load('MyService.asmx/GetHtml'); In .NET code, GetHtml() returns as string: [WebMethod(EnableSession = false)] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Xml)] public string GetHtml() { return "<spa...

Forms Authentication adding additional information along with ReturnUrl

With Forms Authentication when the app needs to redirect to sign-in page is there an event or any extensibility point that will let me do additional work to the request before it redirects to the sign-in page? I would like to send additional information in the query string that could vary such that it wouldn't work to just statically em...

Hiding/disabling ASP.NET controls when SqlDataSource is empty

Hi, I need to be able to hide or disable a multitude of items (detailsviews, gridviews) when an SqlDataSource returns no rows. So if the page is reposted and no rows are selected, all the controls would be disabled. How would I do this? Thanks ...

ASP.NET relative path

I have an ASP.NET project I'm currently working on. There is a C# file (dbedit.cs) that is used to directly access and edit 2 XML database files. How can I create a relative path of the XML files (both in the same directory) to dbedit.cs? It needs to be portable so it can't be hard-coded in. dbedit.cs is also accessed from two other proj...

Add Date & Time and Convert to UTC

Hello All, I have two dates. Date1 and Date2 Date1 contains "10/12/2010 12:00:00AM". Date2 contains "10/10/2010 03:00:00PM" I want to extract only the date from Date1 and extract only the time from Date2 and join them. Example "10/12/2010 03:00:00PM". Any ideas? Thanks ...