|
Hello
All you need is in System.Net.Mail namespace. Check MSDN for samples, or search the C# network articles here in CP.
Regards
|
|
|
|
|
Dear Respected Programmers
Kindly help me and give me solutions about :-
whenever I insert the date value into table
"Example VAlue 01/08/2006" it goes to with this format => 08/01/2006. Please help me.
Thank you very much in advance
|
|
|
|
|
Hello
The problem is in your culture. What culture do you use in your program - if any-, and what culture is installed on the machine?
DD/MM/YYYY can be transfered by error to -> MM/DD/YYYY
Regards
|
|
|
|
|
The problem is that you don't use the date format that the database expects, so it interprets the date wrong. It's not stored with the wrong format (as a date field doesn't have a format) but as the wrong date. If you try 13/08/2006 you will get an error message, as there is no 13th month.
Use parameterized queries, then you don't have to bother about the format of the date.
---
b { font-weight: normal; }
|
|
|
|
|
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; }
|
|
|
|