Top Solutions

2 DropDownList Boxes (ddStates, ddCounties)
Both are AutoPostBack.
ddStates_SelectedIndexChange says to populate ddCounties.
ddCounties_SelectedIndexChanged says to populate some other DropDownList.

When I select any county other than the...

Tags:C# -- KeyChar Values --> ie. Backspace=8, etc

What website link(s) displays a list of all KeyChar
values so I can change my below method ?

Example:
            //  45 = dash/minus
            // 13 = enter...

I have the following:
public System.Data.DataSet ds = new System.Data.DataSet();
        public System.Data.DataRow dr = new System.Data.DataRow();
            
it gives me an error...

Tags:C#

I want to write some code to format the numeric inputs in a TextBox that each three digit is seperated with a comma, like this: 1,648,195 (like using {0:N0} format string)
But I want to format the input in textbox when typing.
I write a little...

Tags:Excel, C#, Format Category Axis, Chart Background Color

I am trying to use C# to generate a spreadsheet that has a chart graphing a few non-contiguous rows of data.  I have almost everything working.  There are two things remaining that I cannot figure out how to do.  One is to set the background...

Tags:C#

Here's the situation... I've got a VS.2005 C# WinForms application in which I needed a way to display a powerpoint PPS or a MSWord document inside a form window... after a very large amount of searching and a lot of dead ends I determined the...

I have a form window I open at runtime. It does start center screen. I have some code where every time I click inside of the form, it resizes itself by 10%. When you click it for the 11th time it reverts back to it's original size. I want the...

Tags:C#, ASP.net 2.0

Hello,
I'm looking for a quick way to get a arraylist of a user's roles.

eg:
Arraylist ar = GetUsersRoles(UserName)

Does anyone have a script like this?

i'm using asp.net 2.0 on a 3.5 framework machine in C#

Hi experts,

How can i check if a key exists in a namevaluecollection.

For hashtable we have something like containskey.

How can i check for namevaluecollection?

Regards
Abhinay

Tags:insert, oracle

I am new at this and need help with what I hope is a simple question.  I have a C# app that needs to insert records into an Oracle db.  The code I have runs without error but does not actually insert a record.  Here is my code so far.

string...

if i  , change the dropdown list  , i want the correspondin  price value in gridview column .
Plz help...

I want price value to change accordingly to selection on restaurant name of dropdown list.

I am trying to find an easy way to copy files in C# across servers/domains/account.  I assumed that this would be an easy task until I started researching it about 4 hours ago....

The basic scenario is this:
From my workstationA in workgroupA...

Tags:c# web services ASP.Net

I have a web service that retrieves a data table and returns the datatable.  when I used a sql connection in the web service,  I could output the SQL to XML fine.  but now I need to do it proper and call a stored procedure instead of calling SQL...

Tags:C#

Hello,
on my windows form i have a panel control which consist of Label for displaying certain information. i want to print those information directly from panel. but i failed. is there any way to print all the data from the Panel Control in the...

Tags:c#.net, mshtml, html, select, option

Hello,

I'm currently trying to write a simple C# app to automatically fill details from a CSV file into a webpage (in a Webbrowser control on the form) one row at a time to migrate data between an old and new system at work.

I have been...

Tags:Visual, Studio, C#, Serial, Port

Hi experts!

I have a very simple c# code for sending and receiving serial commands and it works fine. If i send a command and the command is recognized, then I will receive a respond from the serial device. When the command is not recocnized i...

Tags:C# Programming Language

I get this error when more than 4 clients trying to access a WCF web service.  The web method is for doing login verification. The entire error message is:
TimeoutException The request channel timed out while waiting for a reply after 0...

Tags:C#.NET

Using C#.NET VS2005, I have a background worker object. I want to use it to update GUI componets (say a textbox). However, I want to pass that textbox a string parameter from the DoWorkEventHandler.  How do I do this?

I have attached an...

Tags:gridview, sortexpression

Gridview properties SortExpression and SortDirection not maintaining values when using paging...

1) I am manually binding to a MySQL database
2) Therefore I am manually handling the firing of the Paging and the Sorting events in codebehind....

Tags:C#, Visual Studio 2005

I am trying to execute the following, but it doesn't write anything to the database. Can anyone help me debug? I get no error message. It just does nothing.

Can some one help me convert let say "14.5" into "14,5" and vice versa using Globalization. I tried what I could in vain and finally I had to use String.Replace which is not a viable solution for me.

Tags:C#, .net 3.5, WPF, XAML, WPF Toolkit

I've got objects containing data that I'd like to show on a line chart as separate series.  I'd prefer not to declare each series in XAML, since I'd like to use this for different combinations of data and add/remove series on the fly.

An...

Tags:datarow, row, datatable, c#

I have this code to check if a row exist in a datatable:

            DataRow selectedDataRow = ((DataRowView)comboBoxProduct.SelectedItem).Row;
            string rijID = selectedDataRow["id"].ToString();
            DataRow[] foundRows =...

I want that the sendkeys code perform a CTRL + C. I tried two things(See code) does anybody know how to do this? Or is there a standard code in C# to do the copy to clipboard function.

Tags:C#, windows

Good afternoon expert,
Seems like such a simple thing. When a button is clicked the text from user input at textbox is display as a label.
Been working on for two hours and still cannot get it to go. Thanks. Allen
PS getting error message...

Tags:c# vb.net

The code snippet below calculates the timespan between two periods

            DateTime dtStart = DateTime.Parse(StartTime.Text);
                DateTime dtEnd = DateTime.Parse(EndTime.Text);
                TimeSpan ts = dtEnd.Subtract(dtStart);

...

Tags:C#, Visual Studio, labels

I am trying to dynamically create Labels on my form. When I run the following code I get the error "Object reference not set to an instance of an object". (@ line 16 refering to label). Not really sure why...
My design requires that I do use an...

Tags:C#, .NET, POST, file upload, cURL

I need help with sending a file to a remote server using a POST request (along with other either POST and/or GET data).
I have researched this an the only thing that does both (GET and POST at the same time) I have found is cURL.
I have used...

I wrote a Visual Basic 2008 application targetting the .NET Framework 2.0. It runs fine on my development PC, but when I run it on a deployment machine, I get the following error:

Could not load file or assembly 'stdole, Version=7.0.3300.0,...

Tags:microsoft, c# .net crystal

I'd like to simply load a crystal report, pass in parameters, and print.  I tried PrintToPrinter, but I got a database login failed and from research it seems that I have to set the printer which could be anything.  So I pulled in a report...

Tags:C#, LINQ

Hi Experts,

Im trying to figure out the way to take my User table and shove it into the IEnumerable<DataRow> type collection.
According to to this Microsoft example (http://msdn.microsoft.com/en-us/library/bb386921.aspx) this should work, but...

Tags:C#

Hey experts!

I am working on pulling ASP.NET MVC routes from an external file, and it's going well at the moment. My problem is that I want to be able to return the 'controller' attribute from the 'page' element, or the 'controller' attribute...

Tags:C#, NamedPipes, NamedPipeServerStream, Asynchronous, Async

I've done a few days of research attempting to understand how to use NamedPipes asynchronously in C#, but have not had any luck. There are plenty of examples and references, but I don't seem to be understanding them well enough to know what I'm...

Tags:path, get, folder, project

How to get the Project folder path in C#. Example: C:\Documents and Settings\Colorsit123\My Documents\Visual Studio 2005\Projects\Demo\Demo

I am binding a gridview on the aspx file and am trying to get the value of a label in the code behind.
i'd like to put the value in a global variable so I can use it else where in the code page.


How do I go about it? See my code below.

Tags:MSI, Installer, .Net

Hello,
How do msiexec uninstall the Installled component using the product code. how it gets the installed path and removes the component  from the comuter.
Also  in...

Tags:ilist, list, convert, object, c

Is there a way I can convert IList<object> to List<object>? I tried explicit conversion but I failed.

Tags:C#, LINQ, Anonymous Types

Hi Experts.

Need a piece of advice here please.

What's the best way to return the Anonymous type List ?
Lets say I have this list:

            var usersList = (from u in usersTable.GetAll()
                         select new
        ...

Tags:webBrowser, C#, Proxys and webBrowser

Hello,

I need some help from someone who has already use the webBrowser control along with a proxys.

What I need is the following.

1 - Set a proxy for a webBrowser control.
2 - Load a specific site.
3 - Execute a routine over the site....

Tags:abstraction, oops, definition

Hi,

I am looking into "OOPS" - Object Oriented Programming Concepts. I have the following definition for "Abstraction". Can you please explain / justify me this concept in simple terms ? Even though this seems to be simple but i want to...

Tags:file, download, ftp, size

I have aprogram which connects to the FTP server I have the upload peice working I can get he file directory yada yada where the problem lies is
1 - Cant get it to download the code completely(ill attach my download code and the error)
2 - I...

Tags:webcam, Visual Studio

This is probably fairly simple, but I cant find an answer for this question anywhere.

I have a standard cheapo usb webcam and I need to capture a bitmap image from it. I have found quite a few solutions for integrating a webcam, but none that...

I'm trying to use C# to decompress a zip file so that I can read the data in a text file inside of it.  Here is the code that I am currently using...


        public static string Decompress(String strPath)
        {
           ...

I am writing an asp.net/C# web application and I keep getting this insane error message:
Parser Error Message: '_ImageManager' is not allowed here because it does not extend class 'System.Web.UI.Page'.
Please see the attached screen snapshot. I...

Tags:C#, sql server, stored procedures

I need to pass a null to Parameter guidNumber2.  Any ideas?

Tags:C#, IE 7.0

I'm getting the error NullReferenceException was unhandled, Object reference not set to an instance of an Object." on this Statement in the code below
--> "foreach (DataRow row in ds.Tables["custTable"].Rows".

How does one set a reference or...

Tags:WPF, C#, XAML, Observable Collection, Object Binding

Using WPF, C# - binding an object to a WPF ListBox with a DataTemplate.

The goal is to declaratively bind an ObservableCollection class to a WPF ListBox. The LIstBox should display a collection of Images (PNG Files). The ObservableCollection...

Tags:C#

The number of rows in the dataset(it has single table) decides the no.of columns to be dynamically added to ultrawingrid.
I tried the code this way
int noofstudents = Convert.ToInt32(ds.Tables["student"].Rows.Count);
for(int...

Hi All,
I have an aspx page with ajax controls and code behind page. I am using a java script for open a popup window from code behind. This is working fine. But I want to open this window inside the update panel rather than open as a new...

Tags:WCF, C#, ASP.NET

I have a WCF Service hosted on a win 2K3 server. .NET 3.5 is installed on the server as well as the windows server 2008 SDK for .NET 3.5.

I am able to see the service through VS 2008 when I right click to add a service reference. That part is...

Tags:C#

ultraWinGrid column summaries

In the InitializeLayOut event of the ultraWinGrid I added the following  code to calculate the column summaries for two of the columns. Both the columns populated with the double values from dataset. ...

Hi,
I'm able to get a Javascript confirmation popup on normal button, but how do i do the same on the buttonfield in Gridview?

Below is my code, i'm able to get the popup, but clicking on "OK" doesn't do anything (it suppose to process...

Tags:IIS 7, WCF, C#, Internet Information Server, Windows Communication Foundation, net.tcp

I have a fresh Windows 2008 R2 Server with IIS 7.5 that I am trying to setup a WCF web service to run on.  I have WAS installed and I have verified that my site has net.tcp enabled for both 808:* and :*.  

However I am still getting some weird...

Tags:MS Visual Studio, C#, Developing for Windows Mobile

So I am developing a test app for a windows mobile device, that is running Windows Mobile 6.  In my application, I have a button that when a user presses it, the digital camera on the device is activated so that the user can take a picture, after...

i have a infragistics ultragrid populated. I gave the cell  click action as Row select. By default first row will we active and in blue color. But after selected any row the color should change to red.
I tried giving activerow.backcolor ,...

Tags:wpd, c#, vb

 I'm working on  application that downloading mp3 files to mp3 player. The SanDisk doesn't have a drive letter and uses MTP for file transfer. i tryed with a  sample of connecting to the device at http://wpdtempsensor.codeplex.com/(i transalsted...

Tags:C#, ASP.NET, 3.5 SP1

Hi Experts,

I want to find a Button "btnDelete" inside an ItemTemplate of a ListView to control his visibility and couldn't find a way.
Below the aspx and the C# code I tried.

Hope you can bail me out.

7oop4q

PS: Framework 3.5 SP1

Tags:C#, LINQ

Let's say i have this query in SQL

Select InstNumber, AccountNumber, Sum(Amount) from Items..


How do i replicate that in LINQ?

I'm tried this below example and i can select the sum column, but cannot select my individual columns. I get...

Tags:datatable, update, row, insert

Hi all

This might have been answered before, but I have been unable to find an answer I can use, so here goes....

I have a DataTable filled with data from an Excel file. Using a for-loop I run through each row in this DataTable and extract...

Tags:ASP.NET, C#

Hello experts.

I'm using a radWindow to popup and show some information. I have a little close button at the bottom of the popup. when the user clicks close I save information to the database and then I want to shut down the window...

the...

Tags:infragistics, ultragrid, pdf

I am exporting an Infragistics Ultragrid table into a pdf. How do I export two tables into a single pdf.

                // configure exporter
                UltraWebGridDocumentExporter1.Format = FileFormat.PDF;
               ...

Tags:C#

Hello,

Problem: I want to add an image watermark (like an image in the background) on the first page of a pdf when it is uploaded to a site that I coded in .Net 2.0

Attempted Solution: used the open-source library iTextSharp version 4.1.1...

Hi,

I have desktop c# application, and when this application main frm loads i want to update some registry value to null ...
the regsitry value resided on:

HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current

This key...

How to convert the object into byte array and send it through sockets in C#?


The code given below does not work properly. I am making an Student object having two attributes name and rollno and then assign this Student object to an object...

Hi All,

    My application uses Registry class (Microsoft.win32) in .Net 1.1 to get the time zone details from registry (HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones). Now we are moving to Windows 7 and...

Hi Experts,

       I tried the below codes to redirect to another form.
_________________________________________________
1 ->
Application.Run(new Form_B());
2 ->
Form_B ShowForm_B = new Form_B();
ShowForm_B.ShowDialog();...

Tags:c# ms-access

I'm inserting a record in a MS-access database.   I'm doing it in the c# section of an asp.net site

I use this code:

cmd.Parameters.Add("@Myndatexti",OleDbType.Char, 50).Value = ((TextBox)(FormView1.FindControl("txtMyndaTexti"))).Text;
...

Tags:C# .NET

I need to print a page with a list. The way it is set up is that the first page have a header with the list of up to 20 lines of items. If there are more than 20 then an additional age will be printed starting with item 21 to upn to 50 (total 30...

Dynamically create ASP.NET Menu Control and thr menu item using C# on button click
can anyone provide me code sample please

Tags:c#

hi guys,
part of my code im getting this error message:
Cannot evaluate expression because the current thread is in a stack overflow state..its only just started happening and cant seem to track the problem.  Is it possible to do a TRY and...

Tags:cube, opengl

I am really new to OpenGL and I have a question about some code that I wrote. I am writting a Rubik's Cube program using C# .NET and OpenGL. I can generate the 27 individual cubes and I can use glRotate and glTranslate, but only when I call the...

Tags:Microsoft`, C#

Thanks in advance for any assistance. Basically, I am trying to create a simple little application that will allow me to pick several Excel files (with the same schema) and then concatenate all these files into one large master Excel file (or...

Tags:c# access

If you use SQL Server as DBMS it's easy to write queries like;
Select * from MyTable Where ID = @ID
from Visual Studio's query bulider when adding a query to a adapter of a table in a dataset.
But when using Access "@" symbol doesn't...

Tags:WebBrowser, control, c#, print

Hello experts,

I am utilizing a WebBrowser control.  I have a custom toolbar that accesses certain features of the control, one of them being a print button.  The print button calls the ShowPrintDialog() method to display the WebBrowser's...

Tags:getschema, oledbconnection

I am using C# and ADO.NET to read an Excel workbook with multiple worksheets. When I use the code below, I get multiple entries for each sheet.

For example, I have a sheet named "Plate_2". When I do the GetSchema call, I see entries for...

Tags:vb.net

Hi,

I have a windows service app that uses a filesystemwatcher.  When a file gets created in a particular directory that I am watching it checks whether the file needs to be processed (by a db check).  If there is no actions to be taken,  the...

Tags:C++, image processing,bitmap,Win32 API

Hi everyone ,
I'm doing image processing for the first time and I'm working with VC++ 6.0 under WinXP.
I would like to create a function which loads an 8 bit grayscale bitmap image and convert it
into a 2D array where each element represents...

Tags:C#

Please take a look at my screenshot below. All I need to do is to set the report and DataGrid to have a limit per page and not continue populating reports in a single page. All the reports get populated in 1 page without moving to the next page....

Tags:C#

I iterate through a List<> of objects. If a certain condition is met in an object I would like to delete it from the List<>. How is best to do that?

Tags:Endpoints, WCF Services, multiple ips addresses

HI There,

I have just deployed a WCF service to production.  The server logs are getting full of error messages and I was wondering if anyone else had encountered this type of error and what solution that used to solve it?

Sean


Event...

Tags:file, log4net, log, create, date

I am using Log4Net to log messages in a C# Window console application (.Net 2.0). It works fine.  I need to create a new log file daily with Date as part of the log file name. I tried using RollingFileAppender in the config file

<log4net...

Tags:C#

Hi all,

I am working on implementing a automated file creation system.

the program does the following:
1. creates a folder in a fileshare with a user's username (jdoe for John Doe accessed via \\server\share\jdoe\).
2. the user is...

Tags:C#, Mail, Notification, ASP.NET 1.1, C# 1.1

I want to receive a delivery notification when sending an email through ASP.NET 1.1 C#.

I can get a read notification using;
testMessage.Headers.Add("disposition-notification-to", txtFrom.Text);

However I cannot get a delivery...

Hello,

I am trying to print the contents of a ListView in C#, using Visual C# Express. I have no idea where to start, but I can't seem to find any good articles that explain it well. How would I go about printing the contents of the ListView...

Tags:CodeAnalysis Visual Studio Code Analysis and Code Metrics MSBUILD

Hi All,

I  need to disable the CodeAnalysis error CA0060 

Is there is any settings which will Turn this error Off.

Note : - I dont want to add these dependent dlls in my project reference.

 

 (RunCodeAnalysis target) ->

 ...

Tags:Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.DropDownList'.

While updating am getting this error,

am using dropdownlist in edititemindex,
while saving am getting this error.
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.DropDownList'.

Tags:C# -- BindingSource to DataTable

How can I get the below without displaying a
Unable to cast object of type 'System.Windows.
Forms.BindingSource' to type 'System.Data.DataTable'
error ?

        private void transAllergensDTBindingNavigatorSaveItem_Click(object sender,...

Tags:RAD, combobox

I am uising RadControls for ASP.NET AJAX Q1 2010 NET35

For some reason the OnSelectedIndexChanged event is not firing.

Does anybody have any ideas about what is going wrong?

Thanks,

Tags:asp.net 2.0, c#, my life is complicated

Hello!

I made one gridview just to export the data to Excel. It's "easier" than the first becuase I don't need all the data (columns). I can replace the checkboxes with the string but I need to display pictures for all values in table where...

Tags:c# winforms

I have a ListView where, under some circumstances I want the user to be able to click on it to select and deselect multiple items, but at other times (with the same items in the list) I want the selection to be determined programmatically (as the...

Tags:C#, Office, Interop, Excel Chart

I have been working on trying to make a chart in Excel from a C# application.

I'm getting the data itself into the sheet fine.  However I need to make a line chart and add each series individually as each series will not have the same amount...

Tags:C#, .NET, Visual Studio

Hi,

I am in the process of writing a piece of code that will rotate a polygon (in C# a Point[]) I found an example here http://www.codeguru.com/forum/showthread.php?t=346093 (4th post) and tried to recreate it in C# (see attached code...

Tags:C#

In the Initialize Layout  event of the ultrawinGrid I have for loop. I dynamically added the columns to wingrid. In each iteration I make a call to the database and the dataset will returned. I need to assign the one column of the dataset the...

Tags:C# .NET

I'm trying to write code so that when I click on a pictureBox (lets call it myPicture) it will create a timer, and every second move it by N amount up the form on the Y axis.

However I'm stuck as to how to create a timer with an eventhandler...

Hi
I get the following error:
Error      1      foreach statement cannot operate on variables of type 'WebSiteClassLibrary.BLL.RetrieveNewPollBLL' because 'WebSiteClassLibrary.BLL.RetrieveNewPollBLL' does not contain a public definition for...

Tags:C#

I need to populate the Infragistics UltraGrid. I am using the datasset. The stored procedure returns 2 columns month, year.For month it returns the 1,2..........or 12.I can't change the storedprocedure
I am thinking of adding a column to the...

Tags:c# net

FernandoSoto,
As I mentioned in another thread. I follow your code to upload a file to ftp server by webclient at my web application. I pass a file path to the function you posted. I got a exception 'An exception occurred during a WebClient...

Tags:MIcrosoft, ASP.NET, 3.5, c#, any

Hello,

My situation. I am using HTML-PDF dll to create dynamic pdfs. The HTML called by the pdf converter is protected with authorisation so only logged in users can view  PDF's (eg invoices, quotes etc).

My issue is when I need to send a...

Tags:c#.NET, IE6+/Firefox 3+

Hi there,

I'm currently working on getting some integration between our flagship company product and Interwoven, a Document Management System. Interwoven has an integration API which we've used to build a website which profiles documents...

Tags:securestring, string, convert

Hi,

Is there anyway I can have a function that can covert from a string to a secure string?


SecureString SecurePassword = new SecureString();

e.g something like:

SecureString SecurePassword = new SecureString();
string password =...

Loading Advertisement...

Top Visual C# Experts

  1. kaufmed

    39,306

    0 points yesterday

    Profile
    Rank: Genius
  2. JamesBurger

    29,150

    0 points yesterday

    Profile
    Rank: Sage
  3. CodeCruiser

    16,200

    0 points yesterday

    Profile
    Rank: Genius
  4. AndyAinscow

    13,836

    0 points yesterday

    Profile
    Rank: Genius
  5. nishantcomp2512

    13,260

    0 points yesterday

    Profile
    Rank: Wizard
  6. emoreau

    8,800

    0 points yesterday

    Profile
    Rank: Genius
  7. jonnidip

    7,868

    0 points yesterday

    Profile
    Rank: Master
  8. Idle_Mind

    7,162

    0 points yesterday

    Profile
    Rank: Savant
  9. mas_oz2003

    6,750

    0 points yesterday

    Profile
    Rank: Genius
  10. Sudhakar-Pulivarthi

    6,532

    0 points yesterday

    Profile
    Rank: Guru
  11. Michael74

    6,018

    0 points yesterday

    Profile
    Rank: Wizard
  12. RolandDeschain

    6,000

    0 points yesterday

    Profile
    Rank: Sage
  13. ddayx10

    5,300

    0 points yesterday

    Profile
    Rank: Sage
  14. apeter

    5,232

    0 points yesterday

    Profile
    Rank: Sage
  15. TheLearnedOne

    5,000

    0 points yesterday

    Profile
    Rank: Savant
  16. navneethegde

    5,000

    0 points yesterday

    Profile
    Rank: Wizard
  17. mroonal

    4,900

    0 points yesterday

    Profile
    Rank: Sage
  18. naman_goel

    4,664

    0 points yesterday

    Profile
    Rank: Guru
  19. AhmedHindy

    4,500

    0 points yesterday

    Profile
  20. mlmcc

    4,000

    0 points yesterday

    Profile
    Rank: Savant
  21. UndefinedException

    4,000

    0 points yesterday

    Profile
  22. ged325

    3,468

    0 points yesterday

    Profile
    Rank: Genius
  23. keyu

    3,400

    0 points yesterday

    Profile
    Rank: Master
  24. nilhan

    3,200

    0 points yesterday

    Profile
  25. SStory

    3,136

    0 points yesterday

    Profile
    Rank: Sage

Hall Of Fame