|
No worries. You should probably do some reading as well, to get a better idea of the nature of ASP.NET and how your classes are used to generate HTML.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes. I have got a C# book which is good for describing classes and object orientation, and asp.net books which are good for other aspects, but none of them seemed to be able answer this one for me. I think they are too basic. If you have any good suggestions for a suitable book... I have an online voucher for www.ComputerManuals.co.uk to use up.
Words fade as the meanings change, but somehow, it don't bother me.
|
|
|
|
|
Hi everyone,
In a bit of a knot here chasing my tail. I have a webbrowser control embedded in a C# windows app which is calling a .CFM page to provide XML data as an output. I need a way to get this content into a text box in the C# application so as further processing can be carried out.
I am new to C# and would welcome any help that may be provided. The interface works and the webbrowser carries out the action required on the .cfm page it is just the farming of the form fiedl data that is required.
Thank you in advance.
Jarlath
|
|
|
|
|
If you're getting the data as XML, use an XMLDocument and XPath to pull it out.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thank you Christian,
but i know little or nothing of syntax operations and logic in C# as i have coldfusion background. Trying to make the switch to .Net technologies.
Any pointers on how to implement this???
I have an XMLDoc on the .cfm page ready to be extracted
Thanks a million.
Jarlath
|
|
|
|
|
Hi.
I'm designing a diary using a datagrid. The rows are the time in intervals of 15minutes and the columns are the staff members.
I'm able to load the appointments into the grid and what I currently do is calculate the timespan between the end of the appoinment and the start of the appointment, then is have the duration, from there I calculate the duration in minutes and devide that by 15 to get the amount of rows that must be occupied on the grid.
Is there some way that I can merge that amount of rows so that when I enter the details of the appointment I don't have to do it over and over for each row?
Many thanks in advance.
He who laughs last is a bit on the slow side
|
|
|
|
|
HI all,
i have a proble with the list box i am using.
When the user clicks in the list box i want to know if he click an item or he clicked in the white space inside the list box.
Thanks
Jamil abou khalil
|
|
|
|
|
There's a selected index property, I'd imagine that changes to -1 if you click on the box but not an item ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi christian
it is true that when u click in the box but not on an item the selected index will be -1 but whenever you click on an item and it is selected if you click another time in the box but not on an item the selected index will remain the index of that item.
Maybe u didn't understand my question: My problem is that whenever a user clicks inside the list box but not over an item; i want to un-select any selected item in the box (if any).
thanks
Jamil abou khalil
|
|
|
|
|
Hi,
use the "SelectedIndexChanged" Event
But if the user clicks on the same item it won't work ( if i'm remembering good )
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
// THE CODE
}
i hope it helps you
|
|
|
|
|
hi
i want to copy large file bye File.Copy method and show a progressbar for copying . how to do ??
thanks
|
|
|
|
|
File.Copy is a blocking function, so it doesn't report its progress. If you want to do so, I suggest you use 2 file streams to copy your file (use Stream, File.Open, Stream.BeginRead and Stream.BeginWrite).
|
|
|
|
|
Hi there,
I am trying to include a procedure where my application can write some information to a filethat 'might' be a help for me to understand why the application crashed. In C and C++, miini dump was used, what can I use for C# projects? Also, is there any way I can obtain this file remotly?
Many thnx
raff
|
|
|
|
|
Hi all,
I have zip file and i need to know size of files (inside) when i extract it.
How to get this size?
thx
-Mike
|
|
|
|
|
Hi, I have a few question here:
1. I have a Search function to search the datagrid. Thereafter, the pointer will select/highlight the current row. When I do another search, the same process happens but the previous row is still higlighted. How can I remove the previous higlighted row(s)?
dataGrid1.CurrentRowIndex = dRow;
dataGrid1.Select(dRow);
2. After I have search the correct Customer Code, I want to edit the details but not in the datagrid, editiing should be in textfield. How do I set the datagrid current row data to load into the textfield "Customer Code", "Customer Name" etc. The current textfields is bind to the Dataset when I used DataForm Wizard to create the form.
3. Is it possible to use buttons (e.g Previous Button < or Next Button >) to scroll the datagrid rows instead of the conventional (vertical scrolls)? When the button is press (Previous), the CurrentRowIndex become previous row (highlighted also) and the textfield details also change together.
Project Code
private void btnSearch_Click(object sender, System.EventArgs e)
{
try
{
DataRow dr;
DataTable tb = objCustomerDataset.Tables[0];
int dRow;
DataColumn[] DataCol = new DataColumn[1];
DataCol[0] = objCustomerDataset.Tables[0].Columns["Cust_Code"];
objCustomerDataset.Tables[0].PrimaryKey = DataCol;
tb.DefaultView.Sort = "Cust_Code";
int CountRow = 0;
CountRow = this.BindingContext[objCustomerDataset,"Customer Database"].Count;
MessageBox.Show("Number =" + CountRow);
if (tb.Rows.Contains(txtSearch.Text))
{
dr = tb.Rows.Find(txtSearch.Text);
dRow = objCustomerDataset.Tables[0].DefaultView.Find(txtSearch.Text);
BindingManagerBase BM;
BM = this.BindingContext[objCustomerDataset,"Customer Database"];
dataGrid1.CurrentCell = new DataGridCell(lrow, lcol);
lrow = dataGrid1.CurrentCell.RowNumber;
lcol = dataGrid1.CurrentCell.ColumnNumber;
if ((dr == null) | (dRow == -1))
{
string message = "Customer ID not found.";
string caption = "Search Customer ID";
MessageBoxButtons buttons = MessageBoxButtons.OK;
MessageBoxIcon icon = MessageBoxIcon.Warning;
DialogResult result;
result = MessageBox.Show(this, message, caption, buttons, icon);
}
else
{
dataGrid1.CurrentRowIndex = dRow;
dataGrid1.Select(dRow);
MessageBox.Show ("Current Position =" + BM.Position);
//Codes to invoke write Customer Code value to txtCustomerCode and display rest of details
}
}
else
{
string message = "Customer ID not found.";
string caption = "Search Customer ID";
MessageBoxButtons buttons = MessageBoxButtons.OK;
MessageBoxIcon icon = MessageBoxIcon.Warning;
DialogResult result;
result = MessageBox.Show(this, message, caption, buttons, icon);
}
}
catch (System.Exception eLoad)
{
// Add your error handling code here.
// Display error message, if any.
System.Windows.Forms.MessageBox.Show(eLoad.Message);
}
}
}
VS 2003
OLEDB C#: Windows Forms Application
|
|
|
|
|
I don't know how to generate a random number.
Example: from 1-100.
Help.
Does it work on Visual Studio 2003.
Because I have Visual Studio 2003.
-- modified at 3:54 Friday 20th October, 2006
Vasildb
|
|
|
|
|
try using following
int randomNumber = random.Next(maxValue);
- ashish
|
|
|
|
|
Create a random object and use that to create random numbers.
Random rnd = new Random();
int value = rnd.Next(1, 101);
Yes, it works in framework 1.1, which is what is used with Visual Studio 2003.
---
b { font-weight: normal; }
|
|
|
|
|
Hi, I am new to C# and programming in Windows Forms.
I use DataSet.ReadXml and DataSet.WriteXml and Save and
OpenFileDialog to get the filename. I want to save and read some data from the path that the program starts.
In my previous programming language I could easily get the path of the exe file, however Directory.GetCurrentDirectory returns the path that I most recently used in the FileDialog. Is there a Function that returns the path at start of the process (program)
Thasnks
Ramith Sivanarain
|
|
|
|
|
Ramith Sivanarain wrote: Is there a Function that returns the path at start of the process (program)
Try Application.StartupPath
|
|
|
|
|
Hello,
I've read the following article:
http://www.codeproject.com/csharp/globalhook.asp
The code is working very well except for the problem the author mentioned:
Question:
I have a long delay when closing applications using hooks by clicking the x button in the titlebar. If I close the application via another event (button click) for example, that works fine.
Answer:
It's a know bug of Microsoft. It has to do with the Windows themes. If you disable the Windows themes, the problem goes away. Another choice is to have the hook code run in a secondary thread.
Can anyone tell me how can I 'have the hook code run in a secondary thread'?
I would really appreciate your help. Thanks.
|
|
|
|
|
I need to send some command to an external device through IR PORT
I am using a USB to IR Device which will act as the IR Port
How to use this IR Port?
Please Help
Rabindra
|
|
|
|
|
|
Thanks for the reply.
Actually I want one way communication. ie I want to send commands to a dumb hardware which can only receive IR command and perform accordingly.
like a TV.
the hardware is a switcher.
here the connection is not established as the switcher can't reply back.
please help
the link you have provided is not working. It is showing the following
"Location Cannot Be Found
We apologize for the inconvenience, but the location you are seeking cannot be found. If you are looking for a particular document, please try one of the following areas:
...."
Rabindra
-- modified at 23:49 Sunday 29th October, 2006
|
|
|
|
|
I want to receiver and send data with internet and network LAN using C#. But I don't know function and library. who can help me, please? as detail as posibly. thanks!
|
|
|
|