asp.net

Remove Word 2007 tags from a text

Hi, Is there a way to remove tags from text, that was copy-pasted from Word 2007 on a server side (.NET) or client one (javascript). I need just text, without any formatting. ...

How do I turn off snaplines in Visual Studio 2008?

How do you turn off those blue guide lines when working on an ASP.NET form in VS 2008?. You used to be able to just drag absolute controls around. Now, I'm fighting with the designer which won't let me put things where I want to put them! Cheers, Rob. ...

How can I emulate End Process Tree in C#/.Net

We have a web application that has to launch other processes. Typically these processes are batch files that launch a series of other processes. Sometimes we need to kill a batch file process that is running and to do that we need to kill it and its children. What is the best way to go about this in .Net? ...

Calling WCF service from a remote javascript

Hi, I have a WCF service (XML+JSON) running on http://servicehost:8080/myService. My ASP.NET application with jQuery is running on http://webapp/Login.aspx I want jQuery to use Ajax and call the URL http://servicehost:8080/myService. The browser does not allow this cross-host call, which is expected. Some of the posts on stackoverflow...

How to persist scroll position using Master Page?

Hi, I have a site that uses master pages, the only content that changes is a Div in the centre of the page. Is there a way that I can persist the scroll position of the page between postbacks? I'm thinking that it might be possible because all pages are using the same Master Page, if not is there some other way to do this? Thanks ...

Lose of session ID in ASP.NET

I have faced a problem with Asp.NET Session ID. Whenever there are code-behind changes and moved dll to liver server / if there are any modifications to web.config file, the existing session is is not accessible. The session id is going to reset. If we use stateserver then we can retain session values. But it is not possible in some sha...

How can I use asp.net forms authentication to authenticate a Google/OpenSocial Gadget

I have a web site that uses Asp.net forms authentication to login. I need to enable users to login and interact with the site via gadgets using the same authetnication/authorization schema I use on the site. I could not find any good information regarding asp.net authentication and google gadgets. How can I make the gadgets login using...

ASP.Net Grid view data filling issue

Hello everyone, I am using VSTS 2008 + C# ASP.Net application type project. My requirement is, I want to let UI designer to work independently with business logics developer. Since UI designer (normally) do not know how to fill Grid View control using code to connect to database. So, my question is, if there are any ways to generate fak...

CSS file in asp.net website

I have css file reference in my website which is shown as below: <link rel="stylesheet" type="text/css" href="http://go/css/filename.css"&gt; I need to alter the CSS file and upload it in the new location. Is it possible to put it in my local system or can I upload it in same website? ...

How can i add border to the asp.net detailsview commandrow cell?

i have a problem on below image: I have detailsview, but i can't show border left and right on commandrow cell. Here is the css codes: .dvCommandRow td { border-right: solid 1px #B4B4B2; border-left: solid 1px #B4B4B2; text-align: right; padding: 5px; /* border:solid 1px #B4B4B2; I deleted but still problem cont...

ASP.Net static objects

I'm trying to cache some information that I've retrieved from a database. I've decided to use a static List<> member to store the information. I know from my experience with List<> in multithreaded applications that I need to protect access to it with the lock statement. Do I treat any code in my Asp.Net code the exact same way? Will the...

Silverlight WCF web service hosting on domain.com and www.domain.com

There's so much stuff on this online but no one seems to be able to answer this... Hopefully someone here will be! So i have a WCF web service hosted at godaddy.com. Everything works great when i try accessing it using: http://www.domain.com/DataService.svc problem is when i remove the www i.e. http://domain.com/DataService.svc Here...

CSS - What's the best way of creating a 9x9 Sudoku grid?

I am working on a few projects to improve my HTML and CSS. One of which is a simple Sudoku solver. I need to create a Grid in which to put either Labels or TextBoxes. I want a grid layout exactly like the Grid image in this question. What's the best way of achieving this? CSS... or tables? And how would I go about creating this? ...

How can a Perl web crawler follow an ASP.NET postback?

I'm building a webcrawler in Perl/LWP. How can the webcrawler follow a link in a ASP.NET grid like this: <a id="ctl00_MainContent_listResult_Top_LnkNextPage" href="javascript:__doPostBack('ctl00$MainContent$listResult$Top$LnkNextPage','')">Next</a> ...

[ASP.NET] What are the differences between User Controls, Server Controls & Custom Controls?

I thought I had reasonable answers for this question at a recent interview, but I bombed it. :( What are the major differences between the three? If not obvious by the answer to the previous bullet, when would you choose one over the other? ...

Get current ApplicationId in ASP.NET MembershipProvider

I am using the MembershipProvider and due to the way I have set it up with in conjunction with some custom security I need to get the ApplicationId (Guid) of the current application. It is easy to get the application name using Membership.ApplicationName, but I have found no easy way to get the Id. ...

Image from HttpHandler won't cache in browser

I'm serving up an image from a database using an IHttpHandler. The relevant code is here: public void ProcessRequest(HttpContext context) { context.Response.ContentType = "image/jpeg"; int imageID; if (int.TryParse(context.Request.QueryString["id"], out imageID)) { var photo = new CoasterPhoto(imageID); if (pho...

Generate DropDownList from code behind

Hi I am generating a DropDownList in my code behind file protected DropDownList CountryList() { DropDownList ddl = new DropDownList(); XDocument xmlDoc = XDocument.Load(Server.MapPath("Countries.xml")); var countries = from country in xmlDoc.Descendants("Country") select new ...

ASP.NET login controls modifying source file locations

I have login control on a page that is automatically redirected to if the user requests a page that he/she does not have access to. The page paths to scripts are rendering fine, however, firebug is reporting 3 errors. Hovering the mouse over the errors reveals problems with the link. http://localhost:1535/testingproject/loginregister....

memory occupied by session variables

Possible Duplicate: How to find out size of session in ASP.NET from web application? Hi, Is there any way to know the memory size occupied by session variables in asp.net application? Thanks, P.Gopalakrishnan. ...