Forum: C# Nov 19th, 2007 |
| Replies: 10 Views: 5,945 This correctly checks if the value is a number but not a decimal.
You are converting the value to an int which cannot have a value past the decimal point unlike the decimal.
So passing ".1" would... |
Forum: C# Jan 26th, 2007 |
| Replies: 4 Views: 2,620 static void Main(string[] args)
{
string s = "123456789012345678901234567890";//source string
int i=7;//index
do
{
s =... |
Forum: C# Jan 25th, 2007 |
| Replies: 4 Views: 2,620 I dont know what you are trying to do but i made this for you.
There might be a better way but this adds chars in groups of 7 to a string.
string src = textBox1.Text;//source
... |
Forum: C# Oct 3rd, 2006 |
| Replies: 3 Views: 11,363 try storing it in your context.session.
ive always prefered to just hit the database again for each page.
just grab only enough each query to fill one page.
EDIT: sorry i just realized, that you... |
Forum: C# Oct 3rd, 2006 |
| Replies: 8 Views: 21,340 um that link sucks.
but to add an item its something like
comboBoxID.Items.Add("text","value"); |
Forum: C# Sep 20th, 2006 |
| Replies: 7 Views: 1,867 Oh god, you are trying to get a job programming webpages, and you obviously dont even know what source code looks like.
Im sorry but you fail.
p.s. You will not get any respect in any forum... |
Forum: C# Sep 12th, 2006 |
| Replies: 1 Views: 3,227 Ok, so im having data written to an xml file. This xml is regularly written to, so a decent amount of traffic on it. But rarely ever gets viewed.
Right now i read the xml file in with... |
Forum: C# Aug 30th, 2006 |
| Replies: 3 Views: 3,321 I by no means am an expert in threading but here is what i can gather from this.
you are using 'ThreadPool.QueueUserWorkItem' which queues the item into the current main thread.
What you need to do... |
Forum: C# Aug 28th, 2006 |
| Replies: 3 Views: 2,436 If you cant see your label, you may have created the new method in a different class as your form. Did you make a new cs file? |
Forum: C# Aug 25th, 2006 |
| Replies: 3 Views: 22,092 try this.
it creates its own file stream and sets the access to append.
it replaces your fiest line
Stream xmlFile = new FileStream(@"c:\path",FileMode.Append);
XmlTextWriter... |
Forum: C# Aug 15th, 2006 |
| Replies: 5 Views: 3,259 yeah i like the split idea better.
string[] words = string.split(" ");
fifth word =words[4] |
Forum: C# Aug 9th, 2006 |
| Replies: 5 Views: 3,259 I think an easy way to do this is get the index of the 4th and 5th space. then get the substring between them. |
Forum: C# Jul 16th, 2006 |
| Replies: 5 Views: 10,458 sorry all he asked was how to make a button to work and the window part was really irrelavant, so how can you say my answer is wrong :). and you forgot to mention you actually have to set how the... |
Forum: C# Jul 14th, 2006 |
| Replies: 5 Views: 10,458 usually double clicking the buttons in the ide form design mode will automatically generate code for button events :) |
Forum: C# Jul 14th, 2006 |
| Replies: 7 Views: 35,493 when you call .Focus() on a control in asp.net code. asp.net actually generates a seperate .js file. |
Forum: C# Jul 12th, 2006 |
| Replies: 7 Views: 35,493 with TextBox1.Focus();
asp.net will gerenate the javascript for you. |
Forum: C# Jul 7th, 2006 |
| Replies: 1 Views: 1,480 Look up tutorials on the System.Net.Sockets namespace
I wouldnt expect anyone on a forum to teach you how to program network connections.
wtf is with these kind of questions? :s |
Forum: C# Jul 7th, 2006 |
| Replies: 3 Views: 4,606 You should just beable to bring the label control to the front. which i think does nothing more then changes the order of the controls being added to the form, in a way which the label should be... |
Forum: C# Jun 4th, 2006 |
| Replies: 1 Views: 1,232 not exactly .net but i like http://www.codinghorror.com/blog/ |
Forum: C# Jun 2nd, 2006 |
| Replies: 5 Views: 5,507 no dont take out the username and password.
just take out "Trusted_Connection=yes;";"
and use the connection string i showed you
UID is now User Id
PWD is now Password
etc... |
Forum: C# Jun 2nd, 2006 |
| Replies: 3 Views: 15,708 this is insanly easy, and you more then likly have not even tryed to google tutorials on this because there are thousands that cover this single topic. |
Forum: C# Jun 2nd, 2006 |
| Replies: 5 Views: 5,507 try getting rid of the Trusted_Connection that has always led me to problems when logging in without intergrated security.
And try the newer format for the connection string, below is the one i... |
Forum: C# May 27th, 2006 |
| Replies: 12 Views: 19,464 look at what i did to copy a different row!
DataRow newRow = outputXML.Tables[0].NewRow(); //make a new row with the tables scheme
newRow.ItemArray = pcRow.ItemArray; //copy over the... |
Forum: C# May 27th, 2006 |
| Replies: 12 Views: 19,464 sure just look at the rows itemarray and check what has changed
like do this after you find a matching id:
for(int i=0;i<pcRow.ItemArray.Length;i++){
if(pcRow.ItemArray[i] !=... |
Forum: C# May 27th, 2006 |
| Replies: 12 Views: 19,464 oh yeah a few things i forgot to mention
the code you posted was not formatted properly.
a few tags were spelled differently then they were closing, like:
<Date> 20060426 </Datum>
... |
Forum: C# May 26th, 2006 |
| Replies: 12 Views: 19,464 hopeing you understand this!
dataset contains an array of tables
the tables contain an array of row which are your records
and the table contains an array of columns
you can call the rows by... |
Forum: C# May 26th, 2006 |
| Replies: 12 Views: 19,464 an even easier way, just use/do the following.
1.
read in the xml files with
DataSet.ReadXml method
2.
compare the id columns in the dataset to each other, looking for duplicates or whatever... |
Forum: C# May 26th, 2006 |
| Replies: 7 Views: 15,197 If there is an error while writting in your code the file will not close,make sure you close that file if there is an error. otherwise if it stays open youll just get more errors trying to open an... |
Forum: C# May 23rd, 2006 |
| Replies: 4 Views: 7,370 I tried this a while ago, and its not 100% possible because i think not all files contain a header or such that says what the file is |
Forum: C# May 23rd, 2006 |
| Replies: 3 Views: 10,925 have you tried DateTime.Parse ? |
Forum: C# Apr 19th, 2006 |
| Replies: 3 Views: 9,279 i didnt really read your code so im not sure what your doing with the data. but anyways im sure all you need is ms office installed on the machine for it to work.
if all you are doing is reading... |
Forum: C# Apr 6th, 2006 |
| Replies: 10 Views: 5,945 Here is an example of my prefered method.
the double.TryParse
a regex would also be a good idea to put in front of this over a textbox (if you have 2.0). expecially if its like asp.net
... |
Forum: C# Apr 1st, 2006 |
| Replies: 12 Views: 6,569 i dont know if you solved this but, the pixels in the images are like an array so it starts and 0 and ends and the length-1 (-1 becuase its starts at 0, and lenth is the count)
... |
Forum: C# Mar 29th, 2006 |
| Replies: 2 Views: 4,725 [QUOTE=campkev]1) if all you are going to do with the get and set is
you might as well make it a public variable
QUOTE]
actually that property is the only thing which he did right.
sorry but... |
Forum: C# Mar 29th, 2006 |
| Replies: 16 Views: 29,534 can i see the latest version of your page and code |
Forum: C# Mar 28th, 2006 |
| Replies: 16 Views: 29,534 are you even connecting to the database? like can you run a simple "select * from book"
because i just tried "select * from book where name like '%x%' OR description like '%x%'"
in c# and it... |
Forum: C# Mar 20th, 2006 |
| Replies: 1 Views: 3,713 remove the insert to the id
it is probably your primary key with a unique idenifier, which auto increments.
which means that you can have 2 of the same ids, if it doesnt auto increment make it... |
Forum: C# Mar 7th, 2006 |
| Replies: 9 Views: 6,318 the above doesnt make sense but i think i understand what you mean like this?
try this, i dont know if this works tho
SELECT price, quantity, quantity*price AS Total, Total-amountpayed AS... |
Forum: C# Mar 7th, 2006 |
| Replies: 9 Views: 6,318 do this with sql and it will save you a lot of trouble, here is a quick example assuming the table has a column called price and one called quantity
SELECT Price, Quantity, Price * Quantity AS... |
Forum: C# Mar 7th, 2006 |
| Replies: 1 Views: 10,064 I suggest you create a control with 4 seperate buttons for each function, but then draw them together so it looks like one button.
below is code that makes a button look like a circle. this should... |