asp.net

Can I create a Facebook Application using C# ?

Hello I was taking a look at this Facebook Guide Documentation, and I was wandering if it is possible to: create a Facebook application not using PHP but ASP.NET and C#? would I have access information like e-mail, username, city/location, etc? ...

Design document for Asp.net User Interface

I was asked to create a design document from the aspx pages screenshots provided by the client. Can someone guide me tips/sample design document we can create for aspx pages? (Like using MVC etc..) Thanks in advance Neelu ...

Can’t make sense of HttpRequest.ApplicationPath

HttpRequest.ApplicationPath returns virtual root path for current application, so shouldn’t in the following example when user requests http://localhost:64390/WebSite2/Default.aspx, lblApplicationPath.Text return string “/WebSite2”, since that is the path from web site’s virtual root to WebSite2 application’s virtual root? Instead it ret...

How Create deployment application for ASP.Net, windows service?

Hi,I am currently working in a project where it is having multiple asp.net web applications, windows services. Now we have a requirement that I need to create an Setup application should do the following tasks automatically create database, install web applications in IIS virtual directories, install windows services and modify all con...

How does pagination work in ASP.NET(Using VB.NET)?

I know how to create and populate a datatable, which i have already done. Now, I simply want to display the datatable on a webform, but I also want to know how to paginate and sort it. Ultimately I do not want to bind this to a datagrid or gridview. I would like to learn how to programmatically do this myself. Can you tell me how to ...

CUSTOMIZE Createuserwizrad and store additional user INFO

I created a table(UserProfile) to store additional user info and create foreign key relationship btw UserId of UserProfile table & asp.net_Users table. When i run the createuser page i have this error: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_User_Profile_aspnet_Users1". "dbo.aspnet_Users", column 'UserId'...

Clearing the value of ASP.Net 2.0 File Upload Control using javascript that works on all browser?

We are running following javascript function: function btn_AddToList_Click() { var filePath = document.getElementById("FileUpload").value; if(filePath.length > 0) { var opt = new Option(filePath,filePath); var listBox = document.getElementById("ListBox"); listBox.options[listBox.options.length] = opt; } } ...

Request.QueryString giving me space instead of + sign

If I have a URL value http://Localhost/default.aspx?ts=/+m2dAZZA3DaavaaupUXkZL83n7TwmCVm Request.QueryString[ts] is giving me / m2dAZZA3DaavaaupUXkZL83n7TwmCVm How to ensure that I get all the value from the Querystring is there an encoding or something? ...

Preserve Line Breaks in Asp.net Textbox

I have a multiline textbox whose .Text property get saved in an SQL 2008 DB. When I submit the textbox, I loose the returns. How do I handle this? I've used Enviroment.Newline() to do some html conversion stuff, but I've never ran into this specific problem. Edit: Nevermind, it was working just fine, but I was replacing "\n" incorrec...

What's the difference between button.click event and button.command event?

Whats the difference between Button.Click Event and Button.Command Event in asp.net? ...

Usage of Oracle binding variables with LIKE in C#

As part of an effort to stop using dynamic SQL generation and encourage use of bind variables, I am running into some problems. I am querying an Oracle 9i database from an ASP.NET page using Oracle Data Providers for .NET The query is sql = "SELECT somedata FROM sometable WHERE machine = :machineName "; I define the Oracle Paramete...

how to edit user's profile variable (from web.config) while specifying user?

This is how I edit the profile variables for a currently logged in user: Profile.variablename = "this"; How can I do the same thing, but specifying the username whose profile variable I want to change, as opposed to just the currently logged in user? Something like Profile.variablename.("username", "this") is what I'm looking for. I'm...

Content within a user control

Hey guys / gals, I am almost too embarrassed to ask this question, but here we go... I am not an expert with user controls, and need some design advise regarding trying to achieve a specific desired functionality. The goal is to have a usercontrol that would render as a complex structure of html elements and css to form an elegant c...

What is the WCF equivalent of the LocalResources or GlobalResources framework(s)?

We have a WCF service which will be accessed from outside systems. Under certain conditions, we want our responses to include some descriptive text. Because the calling system isn't under our control, we need to return the text itself, not an error_code or similar abstraction. The text we return needs to be human-readable, and it must...

Making changes to a pre-populated textbox

I have the following webform with textboxes that are pre-populated on page load: <%@ Page Title="" Language="VB" MasterPageFile="~/default.master" AutoEventWireup="true" CodeFile="admin.aspx.vb" Inherits="admin" Theme="G2M" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content...

C#: Adding context to Parallel.ForEach() in ASP.NET

I have a static class with a static get property, and in this property, I do this: // property body { // HttpContext.Current is NOT null ... Parallel.ForEach(files, file => { // HttpContext.Current is null var promo = new Promotion(); ... }); ... // HttpContext.Current is NOT null } ...

ASP.NET is based on declarative programming?

Recently I have noticed about a subtle restriction in GridView's paging mechanism. Efficient paging, loading just requested page of data, is only possible with using DataSource controls like ObjectDataSource that means declarative data binding and is impossible when not using a data source and just from codebehind (MSDN describes it here...

Get the current file being processed in ASP.net

I have a requirement where I want to trace what file is being processed by .net runtime. I mean if it is processing usercontrol x.ascx then it should return the whole path of that, and if it is processing usercontrol y.ascx it should return that. There are some candidates properties. Request.AppRelativeCurrentExecutionFilePath or ...

How can I register a css page from an ascx control?

How can I register a css code block inside an ascx control? Can I just have <head id="head" runat="server"> <style type="text/css"> .customClass { background-color: Lime; } </style> </head> Anywhere in ascx page? I doesn't seem to work? ...

ObjectDataSource Delete problems

Hi all! Enviroment: asp.net framework 2.0 I'm having problems with the Delete method of and ObjectDataSource on a custom object. The Select, Insert and Update methods works fine. Here is the code of the classes: public class Car { public string ID {get; set;}//I know this is 3.0+ syntax. public string Description {get; set;}/...