I have a datagridview which is filled with data from db and i need to do this:
when click on a row in datagrid all the fields with data from this row will be in other textboxes or something else. How to do so? Thanks in advance.
...
I am still relatively new to web service development and I need to make a web service in C# .Net. I have created web services before in Java and run them using Tomcat. Do I have to use IIS to run a .Net webservice or can I use a third party web server (Tomcat or something else)?
Thanks
...
I am currently setting up NCover as part of our CC.NET continuous integration. I've downloaded NCover 1.0.1 from sourceforge, and put the relevent DLLs into the correct nant folder so I can use the tasks in my build file.
The build process instruments our source code correctly, and then goes on to build the solution using MSBuild.
At t...
Hi guys,
Is it a good practice to place helper methods within the MasterPage?
Should I be worried that when I introduce new classes in AppCode folder it can result more objects to be created in the memory and build and application start times will be increased as well?
thanks!
...
I have an HttpHandler configured in my web.config file like so:
<add verb="GET,HEAD,POST"
path="TinyMCE.ashx"
type="Moxiecode.TinyMCE.Web.HttpHandler,Moxiecode.TinyMCE" />
When I deploy to IIS 7 the handler stops working (404).
What do I need to do to get this working?
...
I have built an application that is used to simulate the number of products that a company can produce in different "modes" per month. This simulation is used to aid in finding the optimal series of modes to run in for a month to best meet the projected sales forecast for the month. This application has been working well, until recentl...
Hi!
I have this "problem" that i have code like this in many of my controller actions:
var users = new List<SelectListItem>();
foreach(var user in userRepository.GetAll())
{
var item = new SelectListItem { Text = user.FriendlyName, Value = user.UserId.ToString() };
if (User.Identity.Name == user.UserName)
item.Selected = true;
u...
I have .Net 3.5 on my dev machine but am forced to deploy to a .Net 2.0 machine. Without wiping my current install is there a way to "dumb down" my version of .Net so it behaves like .Net 2.0? Thanks
...
Hi,
I am using Luainterface 2.0.3 to embed Lua in a c# application.
Everything is working fine, except in visual Studio's debug mode, the Lua's print function does not get written to the console (nor to Output).
using System;
using LuaInterface;
namespace Lua1 {
class Program {
static void Main(string[] args) {
...
I created a web service that I want to make more secure by using forms authentication. I added the following code:
[WebMethod(Description = "Login function returns true for success and false for fail.", EnableSession = true)]
public bool Login(string Username, string Password)
{
return User.Validate(User...
I am trying to store a Type of System.Collection.Queue, the queue will only contain strings. The issue I am having is that when I attempt to use it, it is always Null.
Settings.Default.CorrectionsDescription.Enqueue(textString);
I get the following error:
Object reference not set to an instance of an object.
I have gotten StringCol...
I have written an Extension Method off of DataGridView called HideColumns.
public static class Extensions
{
public static void HideColumns(this DataGridView dataGridView, params string[] columnNames)
{
foreach (string str in columnNames)
{
if (dataGridView.Columns[str] != null)
{
...
I have a windows form application in which the Form1 object's initial WindowState == Minimized. This works as desired in the sense that the application does indeed start minimized etc. However, the application shows up in the applications tab of the taskmgr which is undesirable.
I've only personally been able to reproduce this on Vist...
I'd like to use Unity and AntiXss in my mvc project. Could you share your ideas how to put the assembilies in to the svn repository so that other developers would be able to simply checkout the code and start work immediately (without installation of the libraries)?
For example in java world it is common for small project to create a li...
I want to make the calls to a method parallel. In this method I calculate some value (very fast) and write the value of this calculation into a database table.
Therefore I use a Threadpool
ThreadPool.QueueUserWorkItem((state) => {
method();
});
After a while of calculation (not deterministic, the time when ...
Hi,
I'm reading a varchar field from SQL Server 2008, get a DataRow object, and I convert it to a string variable, using VB.NET 2008 (.NET Framework 3.5).
The varchar field unfortunately contains formatting (tabulation, line breaks, etc), and when I convert it to string the formatting is lost.
The odd thing is, when I query the value ...
Has anybody had issues with this? If so, how do you get around it? We are getting sporadic timeout issues and this is getting blamed.
See http://www.vbforums.com/showthread.php?p=3609268 for more details.
...
I have a combo box in which I set up an ItemTemplate that looks something like this:
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Piece.NoPiece}" Width="50" />
<TextBlock Text="{Binding Piece.Description}" Width="170" />
<TextBlock Text="{Binding Piece.Cat...
I'm trying to find a reliable to way to uniquely identify and track distinct HttpRequests in an ASP.NET web site.
Does anybody know anything about the implementation of HttpRequest.GetHashCode()? Specifically, how often do collisions occur?
I understand that HashCodes are not guaranteed to be unique. What I'm trying to understand is s...
I have a SQL 2008 DB. I am running a form that backs that DB up, then tries to update it. If the update fails the idea is to restore that backup. Here is the code I am using to restore the backup.
public void RestoreDatabase(String databaseName, String backUpFile, String serverName, String userName, String password)
{
Restore sqlRe...