1,302 Posted Topics

Member Avatar for art vandelay

Here you are [code=c#] static void Main(string[] args) { Console.WriteLine(GetDifferenceDate(new DateTime(2008, 11, 25, 10, 30, 2), new DateTime(2008, 6, 2, 6, 3, 5))); } static string GetDifferenceDate(DateTime date1, DateTime date2) { if (DateTime.Compare(date1, date2) >= 0) { TimeSpan ts = date1.Subtract(date2); return string.Format("{0} days, {1} hours, {2} minutes, {3} seconds", …

Member Avatar for Ramy Mahrous
0
615
Member Avatar for JGooding
Member Avatar for ovesh

You can code your own UI elements, without playing with InitializeComponent method, this way called creating controls at run time. But give me why you don't need to use VS Designer ??!!!

Member Avatar for Ramy Mahrous
0
112
Member Avatar for virgilio

Sorry, seems I didn't understand you well, you need to get last two characters and increment their value (means if input string xxxxAB so the result should be xxxxBC)? if yes get last 2 characters get each of which increment thier ascii value by 1. that's my solution, if you …

Member Avatar for chsarp_vijay
0
89
Member Avatar for decobatko
Member Avatar for Quindoo

You may have to save it in cookie. Better go to asp.net forum [url]http://www.daniweb.com/forums/forum18.html[/url] and show your question there.

Member Avatar for Ramy Mahrous
0
90
Member Avatar for yilmazhuseyin
Member Avatar for Ramy Mahrous
0
105
Member Avatar for omlac

Stream works in C#, just convert your file to binary data and save it into column of datatype that's for SQL Server 2000/2005 but if you use SQL Server 2008 you don't need to convert it to Binary as there's datatype called FileStream.

Member Avatar for omlac
0
95
Member Avatar for kanjali

why you need to develop it yourself as it exists? just add reference to System.Windows.Forms and use it in your web-based application.

Member Avatar for Ramy Mahrous
0
119
Member Avatar for sowmyask
Member Avatar for sowmyask
0
122
Member Avatar for scru

mmmm, let my think with you, I like such an idea, don't worry they won't delete this thread. I'll work on and reply with some info if got.

Member Avatar for Ramy Mahrous
0
113
Member Avatar for allwin

Better move your thread to ASP.NET forum [url]http://www.daniweb.com/forums/forum18.html[/url]

Member Avatar for Ramy Mahrous
0
26
Member Avatar for rockmania
Member Avatar for Merkant

step towards AOP architecture, sometimes you need to run something before calling the method. like if you want to just print to specific user [code=c#] [CheckUserPermission(userName, password)] void print() { //your code } [/code]

Member Avatar for Ramy Mahrous
0
35
Member Avatar for pierovic
Member Avatar for geetajlo

You can use regular expression to validate user input, in your case your regular expression'd be ^\d{3}-\d{4}$ So, on your btn validate click event handler you can check if user enters valid phoen number or not [code=vb.net] if Regex.IsMatch(txtPhoneNumber.Text, textBox1.Text) then MessageBox.Show("Correct") else MessageBox.Show("Wrong") [/code]

Member Avatar for Pgmer
0
116
Member Avatar for vdmsugar

A modal dialog which requires user to set his/her username and password when s/he i.e press Login call method to connect to SQL Server verfiy using try...catch try->login successed, else login failed

Member Avatar for les"ego"
0
92
Member Avatar for Pgmer
Member Avatar for edek

No, you may have XML file has links text and their URLs, and you should loop on the nodes and create LinkedLabel @ runtime.

Member Avatar for Ramy Mahrous
0
97
Member Avatar for virendra_sw
Member Avatar for alpe gulay
Member Avatar for nasirgul

[code=c#] if (textbox1.InvokeRequired) { //txtFilePath.Invoke(ur delegate ); } else { //call ur method } [/code]

Member Avatar for Ramy Mahrous
0
183
Member Avatar for zls11610
Member Avatar for knowledgelover

Dear knowledgelover, Right click on your setup wizard project->View->Custom actions->and you've 4 points you can run any *.exe at. Say, when installation is Committed we need to create file in C:\ drive. So, we'd create the * .exe which creates the file in that drive and let back to the …

Member Avatar for Ramy Mahrous
0
90
Member Avatar for knowledgelover

Dear knowledgelover, Right click on your setup wizard project->View->Custom actions->and you've 4 points you can run any *.exe at. Say, when installation is [B]Committed[/B] we need to copy files to C:\ drive. So, we'd create the * .exe which copies the files to that drive and let back to the …

Member Avatar for Ramy Mahrous
0
204
Member Avatar for blacklocist

you can't return more than object with different data type but may use yield it may help you.

Member Avatar for ChaseVoid
0
386
Member Avatar for pash11

Where's your question? read in ADO.NET; your questions are simple, look at some samples on MSDN and you'd answer yourself.

Member Avatar for Ramy Mahrous
0
91
Member Avatar for jitupatil_2007
Member Avatar for ChaseVoid

That's too hard to debug your code, please send us the exact problem you face.

Member Avatar for ChaseVoid
0
548
Member Avatar for MahdiDani
Member Avatar for sowmyask

Treat with array of strings, and insert into this array and when you need to reflect this changes use foreach (string s in urArrayOfStrings) { Write in your txt file}

Member Avatar for Ramy Mahrous
0
53
Member Avatar for mjzammit

Split the text in the TextBox by '\n' search for each index in output array in the string and by refering to index you got the line number i.e You were my strength when I was weak You were my voice when I couldn't speak You were my eyes when …

Member Avatar for Ramy Mahrous
0
88
Member Avatar for kaizen202

I've searched how can you detect your speed and I got this piece of code [code=c#] System.Net.WebClient wc = new System.Net.WebClient(); DateTime dt1 = DateTime.Now; byte[] data = wc.DownloadData("http://google.com"); DateTime dt2 = DateTime.Now; return (data.Length * 8) / (dt2 - dt1).TotalSeconds; [/code]

Member Avatar for kaizen202
0
138
Member Avatar for jozcar@yahoo.co

I don't know but it may trim the string before executing DML statement, it sure better than doing such via SQL engine. Jusing guessing good question (Y) And it may have no effect

Member Avatar for jozcar@yahoo.co
0
85
Member Avatar for esmaeel_1211
Member Avatar for toton

[code=c#] Response.Cookies["QueryCookie"].Value = listbox.SelectedIndex.ToString(); [/code] Try using ASP.NET forum in ASP.NET questions.

Member Avatar for Ramy Mahrous
0
146
Member Avatar for sonia sardana
Member Avatar for charitha_sharma

You need to save all UI controls settings in .settings file (which is located on the server) and on FormLoad read these settings. so when client opens its form it first goes to read UI settings (the color of button, the size of form, etc) this would be a solution.

Member Avatar for ericstenson
0
86
Member Avatar for MahdiDani
Member Avatar for Ramy Mahrous
0
52
Member Avatar for navvin_20

From DropDownList properties assign its DataSource to your created datasource, then choose which column to be shown and which to be the value of the items. All from properties or the smart arrow which located on the top left of the DropDownList.

Member Avatar for ushalakshmi
0
164
Member Avatar for geetasks

I don'y know Ajax well, but what I heared that you can't use it without updatepanel.

Member Avatar for Ramy Mahrous
0
82
Member Avatar for emilio

Yes, there is [code=c#] foreach (ToolStripMenuItem item in menuStrip1.Items) { item.Checked = false; } [/code]

Member Avatar for emilio
0
80
Member Avatar for mister03

Try searching on some Windows APIs help you regarding this, there is a program called API viewer may help...

Member Avatar for mister03
0
103
Member Avatar for knowledgelover
Member Avatar for knowledgelover

Let WS1 checks the status of WS2 and use switch\case [code=C#] ServiceController sc = new ServiceController("WS2"); switch(sc.Status) { case Status.Start: ...... } [/code]

Member Avatar for Ramy Mahrous
0
84
Member Avatar for John83
Member Avatar for shilp

Sorry what do you mean by inherit? to use user control in a form or to use abstract user control and another user controls share some layout??

Member Avatar for shilp
0
101
Member Avatar for The Dude
Member Avatar for geetasks

ASP.NET forum [url]http://www.daniweb.com/forums/forum18.html[/url] or ASP forum [url]http://www.daniweb.com/forums/forum62.html[/url] is better than here.

Member Avatar for DayaKumar
0
109
Member Avatar for SyCo

The End.