|
There is no difference. Because writing data to the console is so ordinary MS decided to expose the common.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Nothing. Out returns the standard output stream for the Console. Both WriteLine methods you posted send their output to that stream.
|
|
|
|
|
Dave Kreskowiak wrote: Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...
I wonder if they just kick people out after three years ? That's how long I was in.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I don't know about that. I've seen some people in for longer, especially those who do a lot of speaking at user gruop meetings and write entire books in their blogs.
Sorry, but my son in more important than that...
|
|
|
|
|
Dave Kreskowiak wrote: Sorry, but my son in more important than that...
yeah, I was active in the local user group, but gave up on it eventually as I couldn't keep up without giving them my life. I did leave after a year, so I kept my MVP for two more years. I still think Vista was a big part of my losing it, but the rest I'd put down to politics, and an agenda in terms of the mix of MVPs they want ( that is, more from China and India ).
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: an agenda in terms of the mix of MVPs they want ( that is, more from China and India ).
If that's true, I'm going to throw up and get out of the business.
|
|
|
|
|
I am woking on a application that uses a global mouse hook.
when the user holds the right mouse down for 2 secs the mouse cursor changes.
the problem is when the user releases the right mouse button the shell right click
menu pops up. and is in the way. how can i keep this from happening temporaly.
Thanks
Regards
modified on Monday, August 31, 2009 9:03 PM
|
|
|
|
|
Eat the mouse down message by not passing it up the hook chain.
|
|
|
|
|
HI ,
I m working with Background worker class . I am trying to load data and while loading it takes time to process data . I am trying to get a progress bar showing the data getting processed in the grid on other thread that is loading that data in the form .I am able to design a forming that shows progress bar loading and then data getting processed. I m just calling the form while loading data but it doesn't process the data it runs its own thread to show progress bar loading. May I know how I can do that.
|
|
|
|
|
The background worker class needs to be set to support progress, then it can send an event to the main thread to report progress.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
AFIK there is no system defined large cross cursor.
BTW, why go through all of this rather than use Cursors.Cross and Cursors.None?
only two letters away from being an asset
|
|
|
|
|
Don't delete your question, that is really rude.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
First, this is the wrong forum, you should use the ASP.NET forum as this question is ASP.NET, not C# in general
Second, we're not going review all of you code. Describe your problem and include the relevant bits, not everything.
only two letters away from being an asset
|
|
|
|
|
I am sorry for posting it here...I am deleting the post from here....and to my defense I would say that I thought this much code would be needed to see what I am trying to do here. Though it might seem to be a very unprofessional way to some of us.
|
|
|
|
|
Just info :
1. Do some debugging, and give us only the line, where exception/error is thrown.
2. If we see a lot of code, then we just skip it, sometimes we have no times to review all of your codes.
|
|
|
|
|
private void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack)
{
getMLNO(Specific_Query_DDL.SelectedItem.Value); //This is where I am generating all the values from the DB for the second dropdown list. And as it's getting post back so even if I click submit button then the page gets post back and the selected value for the second dropdown list gets set to the default value, which is ANY
}
}
private void getMLNO(string selectedvalue) //This is the method where all the MLNOs are generated
{
if(selectedvalue=="ResistantL")
{
string sql= "SELECT re_MLNO, MAX(re_SpecimenDate)-MIN(re_SpecimenDate) AS DaysSeronegative FROM ml_hiv_status WHERE (re_HIV1_Status=0) GROUP BY re_MLNO";
OleDbConnection connection = new OleDbConnection(HIV.Database.DataConstants.CONNECTION_STRING);
OleDbDataAdapter adapter = new OleDbDataAdapter();
OleDbCommand command = new OleDbCommand(sql, connection);
DataSet ds = new DataSet();
adapter.SelectCommand = command;
if (adapter.Fill(ds) > 0)
{
DataView view = ds.Tables[0].DefaultView;
mlno_DDL.DataSource = view;
mlno_DDL.DataValueField="re_MLNO";
mlno_DDL.DataTextField = "re_MLNO";
mlno_DDL.DataBind();
resultsLabel.Visible= true;
mlno_DDL.Items.Insert(0, "ANY");
}
connection.Close();
}
}
private void mlno_DDL_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void submitButton_Click(object sender, System.EventArgs e) //SubmitButton_Click method fetches all the data from the Database depending on the 2 values selected from the 2 dropdown list
{
if(Specific_Query_DDL.SelectedItem.Value=="ResistantL")
{
if(mlno_DDL.SelectedItem.Value=="ANY") //All the values from the Db are pulled if ANY is chosen from the second DDL
{
executeResistantListQuery_ANY();
}
else if(mlno_DDL.SelectedItem.Value!="ANY") //Data are pulled if a specific MLNO is chosen from the DB, and this one is not working as always ANY value is chosen from the postback method
{
executeResistantListQuery_MLNO(mlno_DDL.SelectedItem.Value);
}
}
}
Please help. Thank you.
|
|
|
|
|
skhan17 wrote: if (this.IsPostBack)
{
getMLNO(Specific_Query_DDL.SelectedItem.Value);
This will reset the selected item. This is still not the ASP.NET forum.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Wrong forum. Go to ASP.NET forum.
|
|
|
|
|
Thank you all for your suggestion and very strong criticism. This is posted in ASP.NET as well and I don't want to have any reply anymore. Thanks again.
|
|
|
|
|
Please do not delete a message, it creates a mess and is against the rules.
When you're satisfied or no longer interested, edit the message to indicate so in the subject line.
|
|
|
|
|
Hello,
i have a very strange problem, i have a multi-threaded udp-server and a client. Everytime i send a datagram to my server i get a SocketException "Connection was closed by remote host". CONNECTION? in UDP?
I've made my UDP-Server directly with Sockets and not with UdpClient. But the same error i got as i had my server with UdpClient. I really don't know what's wrong there...
Does somebody knows something about this Exception? Can somebody help me please?
|
|
|
|
|
Maybe it has something to do with this[^]?
I'm not sure though
|
|
|
|
|
I am having the hardest time tyring to read from a Excel workbook and putting it into a listview.
I cannot seem to find any good examples online of how to do this with Excel 2007.
Below is basically what I have. It is a standard template. I will NOT know how many rows will be in the workbook either.
So what I am trying to do it take what is in the excel workbook and put it into a listview to get ready to IMPORT into a database.
The reason I am not using the OLB driver is because I didn't really like it. It tended to mess up formats or not import anything.
Excel.Application xla = new Excel.Application();
Excel.Workbook wb = xla.Workbooks.Open(txtFile.Text, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "\t", true, false, 0, true, false, false);
Excel.Sheets excelSheets = wb.Worksheets;
Excel.Worksheet ws = (Excel.Worksheet)excelSheets.get_Item(1);
int g = 1;
for (int i = 1; g <= ws.Rows.Count - 1; i++)
{
Excel.Range range = ws.get_Range("A" + i.ToString(), "J" + i.ToString());
System.Array _values = (System.Array)range.Cells.Value2;
ListViewItem lstItem = new ListViewItem();
lstItem.Text = _values.GetValue(g, 1).ToString();
lstItem.SubItems[1].Text = _values.GetValue(g, 2).ToString();
lstItem.SubItems[2].Text = _values.GetValue(g, 3).ToString();
lstItem.SubItems[3].Text = _values.GetValue(g, 4).ToString();
lstItem.SubItems[4].Text = _values.GetValue(g, 5).ToString();
lstItem.SubItems[5].Text = _values.GetValue(g, 6).ToString();
lstItem.SubItems[6].Text = _values.GetValue(g, 7).ToString();
lstItem.SubItems[7].Text = _values.GetValue(g, 8).ToString();
lstItem.SubItems[8].Text = _values.GetValue(g, 9).ToString();
lstItem.SubItems[9].Text = _values.GetValue(g, 10).ToString();
lstImport.Items.Add(lstItem);
g++;
}
xla.Quit();
|
|
|
|