|
Hi,
Your problem is the DateTime format that the database requires. The Access database uses the Culture as it's set in the Regional Options. If you want to force your application to use a certain culture use something like:
<br />
Application.CurrentCulture = new System.Globalization.CultureInfo("en-US");<br />
An easier way is to extract the Month,Day,Year and create the string in the way that the database expects.
<br />
DateTime now = DateTime.Now;<br />
string s = String.Format("{0}/{1}/{2}",now.Day,now.Month,now.Year);<br />
Do your best to be the best
|
|
|
|
|
hi,
Please can Any one tell me,
how to change the color of Indiactor in Radio button using themes.
sunny
|
|
|
|
|
Hello
I don't know what you mean by themes, but if you mean windows themes, they automatically changes how your forms look not just radiobuttons. If you mean you wnat to change it by yourself handle the paint event and draw whateve you want accodring to the checked status using e.Graphics.
Regards
|
|
|
|
|
Hi all,
I have designed a custom message box using form,label and Ok,cancel buttons. here i have a problem like the user may want to display a message with multiple lines. I set the label autosize=false, form's borderstyle=FixedDialog. so it is displaying at the maximum of 2 lines rest of text being hidden in the label. how can i automatically resize the form for the Labeltextwidth. (as like as normal windows messagebox)
Thanks
Srini
|
|
|
|
|
Hello,
Have u seen this article.
This may helpfull to u.
Best of luck
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Hi,
try adding this code in paint event of the messagebox form.
this.Width=label1.Width+10;
this.Height =label1.Top+label1.Height+30;
hope this works.
Nitin...
|
|
|
|
|
I'm sure this is quite possibly the world's most stupid question but it's driving me crazy!
I have a form with a link that I want to open up a word document.
The link is simply... <a href="file:///C:\test.doc">Click</a>
The problem is, when I type this into an html page of the simplest kind <html><body> as above </body.. etc etc it does just what is says on the tin and opens the word doc.
However, when I add it as link in VStudio with the same details it just looks at me blankly when I click it. I even tried typing it out as text and adding it as a label, same thing, it just stares at me, and I swear it's grinning evily!
What is the aspx page doing that stops it working and how can I make it perform my bidding?
Any answers gratefully received as this is driving me crazy.
Thanks
Pete
-- modified at 6:22 Monday 21st August, 2006
|
|
|
|
|
Hey Pete
Did you tried adding a @ before te string "file:///C:\test.doc" ?
C# treads \ as special characters, to ignore them, you should add a @ .
I hope this works.
Good luck
|
|
|
|
|
Still does the same thing I'm afraid
I did notice that when I click the link it says "Downloading from site: http://localhost, etc etc" in the bar at the bottom of the page for about 3-4 seconds and then just shows the page with the lonely little link on it.
I wondered if it might be due to running it from VStudio but it does exactly the same thing (ie nothing) in the deployed Web Part I need it for as well.
|
|
|
|
|
i am adding data using datatable in the gridlayout
how can i hide one colum or reduce its width.
regards
Siakndar
sikandar
|
|
|
|
|
Hi,
I did something similar in asp.net 2.0
I think it was to do with gridview.column(indexNumber).visible=false
|
|
|
|
|
Hi
I want to find a row in datagrid in order to special value.
It means I want to select a row that it's first column equal to some value.
Now the question is this :
Is there any fast code to do this?
I want this, but it's slow:
<br />
DataSet ds = new DataSet();<br />
ds = (DataSet)myDataGrid.DataSource;<br />
for (int i=0;i<ds.Tables[0].Rows.Count;i++)<br />
{<br />
if (ds.Tables[0].Rows[i][0].ToString() == '19001')<br />
{<br />
myDataGrid.Select(i);<br />
break;<br />
}<br />
}<br />
Please help if you can.
Tank you.
|
|
|
|
|
You Can use The SELECT method Of DataView Meybe this is more faster
MHF
|
|
|
|
|
try this it may help you
ds.Tables[0].Columns[0].Contains("string");
or
ds.Tables[0].Columns.Contains("string");
but for this you may need to create a primary key.
sikandar
|
|
|
|
|
make and other method using thread it will reduce the load
like
replace
call it like this
Thread th =new Thread(new ThreadStart(procedure));
th.start();
void procedure()
{
DataSet ds = new DataSet();
..
..your code
}
}
}
--------------
or use this
ds.Tables[0].Columns[0].Contains("string");
ds.Tables[0].Columns.Contains("string");
ok
sikandar
|
|
|
|
|
I made a Windows form in C# which contains 2 labels and 2 text fields the label name are saved in xml the xml fomat is
<id lbl="label01="firstlabel"/">
<id lbl="label02="secondlabel"/">
and u know to change the name of label we write
label01.Text=string1;
label02.Text=string2;
I do not want to use this. in case I have many labels then??
My question is there any other way so that i change its text (geting label01 from xml and its respective text).throug loping crateria.
thanks in advance.....
Sikandar
sikandar
|
|
|
|
|
You can iterate over the controls collection looking for labels if you prefer, and if that works with the data you need to place into the labels. You could even iterate over the controls collection and create a new collection of only labels, but as soon as a label is added or removed, this would be wrong ( unless you made a private property that did this every time you wanted the labels collection ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
My friend! Your request was not in definite.
May be below code can help you :
<br />
int i=1;<br />
foreach (Control ctrl In this.Controls)<br />
{<br />
if (ctrl Is Label)<br />
{<br />
ctrl.Text = "Label" + i.ToString();<br />
i++;<br />
}<br />
} <br />
please contact me if i couldn't help you.
|
|
|
|
|
|
Could anyone help me with the code to find Eigen value and Eigen vector of an image and also the code of SVD (singular value decomposition)?
Vicky
|
|
|
|
|
Follow up on the reply that you got the last time you asked the question, instead of just posting it again. If you just ignore the people that actually are replying, they will think that you are rude, and stop replying to your posts.
---
b { font-weight: normal; }
|
|
|
|
|
sorry man,
I couldn't catch up the reply to the prevoius posting of my problem .
So the question of being rude doesn't arise. If u have the solution to my problem, please resend that.
Thank you.
Vicky
|
|
|
|
|
vickyProgrammer wrote: I couldn't catch up the reply to the prevoius posting of my problem .
What do you mean? You just press the reply button on the post you wish to reply to.
vickyProgrammer wrote: So the question of being rude doesn't arise.
It does if you don't explain why you are breaking the standard etiquette for the forum.
|
|
|
|
|
i want to insert image in varbinary field in database
and redisplay it from select statment to picturebox
thank you
fatma
|
|
|
|
|
Since you didn't ask a question I'm assuming you are stuck on something rather than just wish to announce to the world your intentions. What part of the above would you like help with?
|
|
|
|