.net-3.5

C# - Center form based on listview coordinates?

I have a form that contains two listview controls. When I click on each listview another smaller form will appear. How do I get the smaller form to center on the calling listview control? I think it has something to with the SetBounds but I am not sure. ...

Transalation of tasks in .NET 1.1 to .NET 3.5

In .Net 1.1 I would run a stored procedure to fill a typed dataset. I would use a Datareader to fill the dataset for speed (though it was probably not necessary) Then I would use the Dataset to bind to multiple controls on the page so as to render the data to multiple CSS/javsript based tabs on the page. This would also reduce the dat...

Entity Framework select single value from row

Hi all. I am using Entity Framework from .NET 3.5 I have two tables with 0-1 to many relation. Let's say Citizen and City. Each citizen has foreign key column (ID) that connects him to City. When i select single citizen, i also need to select the name of the city where he lives. Because city table contains tons of data that is not real...

I want to know how to add the smart tag to a custom control or say user control same way as built in controls are having

Hi I am developing my user control using a textbox control using c#.net now i want to add a smart tag to it same way as the built in controls are having but i don't know how to do that please guide me Thank You Hardik Patadia ...

login control not workin after some times in asp.net

hello i am manish my problem is i have created a website with login control in ASP.net it works properly first few time after some time it generates an error "your login attemt was not successfully plaese try again" this type of message i got when i tried to login after some times. can anyone solve this problem. i am using sqls...

What is the equivalent for try-finally block in workflow foundation?

There is a specific activity I want to execute even after exception has thrown, just like a try{}finally{} block. Is it possible in sequential workflow using WF v3.5? ...

How to automatically scroll ScrollViewer - only if the user did not change scroll position

I would like to create the following behaviour in a ScrollViewer that wraps ContentControl: When the ContentControl height grows , the ScrollViewer should automatically scroll to the end. This is easy to achive by using ScrollViewer.ScrollToEnd(). However, if the user uses the scroll bar, the automatic scrolling shouldn't happen anymore....

worker process in IIS shared hosting

Can anyone tell me, is there a way to run a process in IIS shared hosting service. Suppose, the scenario is like "I want to send emails to a list of email id's after everywhere 3 hrs", so the challenge here is the process should not be invoked by a HTTP link. It should be automatic. I think we can do this by IIS worker processes. Also...

Can I use the task parallel library in a .Net 3.5 project?

I heard that the Task Parallel Library can be used in a .Net 3.5 project. Is this correct, and if yes, how do I use it? In .Net 4.0, it resides in System.Threading, but when I select .Net 3.5 as the target in Visual Studio 2010, I don't get access to classes like Parallel and the Parallel loops. ...

reset button is not working in asp.net

Hi, I have an asp.net web page that displays data that was returned from the database. However, when I attempt to click "Reset" (<input id="btnReset" type="reset" value="Clear" />) the button doesn't do anything. ...

Clickonce downloading the deploy files via HTTP and not HTTPS

I am working on a project to deploy a project via clickonce. The website where these files are housed will only accept HTTPS traffic and if you attempt to connect via HTTP, our siteminder agent will redirect you to a HTTPS login form. We cannot disable the siteminder agent or enable HTTP for security reasons. In the application file, I...

Launching an SSRS report from asp.net web application

Hi, I have an asp.net web app and I need to launch a pdf report that is developed in SSRS using SQL 2005. The SSRS report query has been created. How can I go about launching the report? ...

In a Windows Form application, how can I simply scan an image using a plugged in Scanner?

User puts a piece of paper on the scanner. User presses a button on my application. Scanner works its magic and my windows form application gets the image and puts it in a pictureBox. What would be the path of least resistance if I wanted to make something like this? I don't need the user to configure colors and settings, etc. Just si...

How to determine which thread is created from another?

Is there any way in .NET for a thread to determine its 'parent', i.e. the thread that created it? I'm diagnosing a timing issue with a black box third party API and would like to find out what custom code of mine it is executing on which thread. ...

Is there any way to get the classes from System.Collections.Concurrent in .NET 3.5?

The question pretty much says it all. Does anyone know of any way to get the collection classes from the System.Collections.Concurrent namespace in .NET 3.5? I guess what I'm asking is whether anyone has gone through the trouble of porting these classes to their own DLL that could be accessed from .NET 3.5. ...

Design ideas for WCF service

I need to design and I'm looking in to using WCF to accomplish this. Basically here is how I have it: Server process: Generate list of files to transfer across multiple FTP/SFTP sites in to a queue. Client(s): Talk to server to get files to transfer. Transfer the files acquired. All the data necessary to transfer the files will be p...

Asp.Net Mvc - Html.TextBox - Set Autofocus property

In Html 5, there is an new attribute on textbox call autofocus. The problem is it is a boolean value (there or not there) It should look something like : <input name="a" value="" autofocus> I try : <%= Html.TextBox( "a", null, new { autofocus } ) %> But, it's give me an error because I'm not setting a value to autofocus... I kno...

Changing where a resource is pulled during runtime?

I have a website that goes out to multiple clients. Sometimes a client will insist on minor changes. For reasons beyond my control, I have to comply no matter how minor the request. Usually this isn't a problem, I would just create a client specific version of the user control or page and overwrite the default one during build time or ma...

Maintain state of an asp.net page

Hi, what is your preferred method to maintain state of an asp.net page, if it is a public website (involving shopping cart, wish-list etc). I am in the process of designing a website that will need to ensure that the user is not able to tamper with the state (such as delete cookies etc). ...

Possible to set monthCalendar to show current month and previous 2 months?

In a WinForms (3.5) application there is form with a monthCalendar control. The calendar control has a calendarDimension of 3 columns by 1 row. This means that it currently shows June, July, August of 2010. Is it possible to have the calendar to show April, May, June of 2010 instead? My dataset doesn't have any future dates so the da...