ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. All rights reserved.Want to know about KeyValuePair in .Net C#<p>hi&nbsp;</p> <p>I want know some thing about this code what does it do and when we use it ?</p> <p>thanks</p>http://www.aspforums.net/Threads/904956/Want-to-know-about-KeyValuePair-in-Net-C/http://www.aspforums.net/Threads/904956/Want-to-know-about-KeyValuePair-in-Net-C/Fri, 18 May 2012 07:15:05 GMTUnable to read or fetch values set in Class Properties in C# .Net<p>Hi ,<br /><br /><br />I have some properties in my base page like this.<br /><br />It reading empty. Which means, I think property not beeing set.</p> <pre class="brush: csharp"> public string AccountNo { get; set; } public string IndTitle { get; set; } public string FirstName { get; set; } public string MiddleName { get; set; } public string LastName { get; set; } public string DateOfBirth { get; set; } public string Gender { get; set; } I am trying to set these properties in some other page like this BasePage Bobj = new BasePage(); Bobj.AccountNo = txtAccount.Text; Bobj.IndTitle = ddlTitle.SelectedValue; Bobj.FirstName = txtFirstName.Text; Bobj.LastName = txtLastName.Text; again i am trying to read these properties in some another page like this. BasePage Obj = new BasePage(); ltAccount.Text = Obj.AccountNo; ltddlTitle.Text = Obj.CAState; ltFirstName.Text = Obj.FirstName; ltMiddleName.Text = Obj.MiddleName; ltLastName.Text = Obj.LastName; </pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/122176/Unable-to-read-or-fetch-values-set-in-Class-Properties-in-C-Net/http://www.aspforums.net/Threads/122176/Unable-to-read-or-fetch-values-set-in-Class-Properties-in-C-Net/Wed, 08 May 2013 02:19:01 GMTSuggest Links for Learning C# in Depth<p>I have been working on <strong>VB.Net</strong> since long time but havn't worked so much on <strong>C#.Net</strong> But now i wanna to learn <strong>c#</strong> in <strong>Depth</strong> so please suggest me some great links from where i can learn <strong>C#</strong> in Depth.I have Good Basic knowledge of C#</p>http://www.aspforums.net/Threads/911369/Suggest-Links-for-Learning-C-in-Depth/http://www.aspforums.net/Threads/911369/Suggest-Links-for-Learning-C-in-Depth/Wed, 04 Jul 2012 04:26:57 GMTString was not recognized as a valid DateTime.<p>&nbsp;dr("Working_Hour") = (Convert.ToDateTime(dr(4)) - Convert.ToDateTime(dr(3))) + (Convert.ToDateTime(dr(6)) - Convert.ToDateTime(dr(5))) + (Convert.ToDateTime(dr(8)) - Convert.ToDateTime(dr(7)))</p> <p>here dr is data row ,</p> <p>how can i remove this error</p>http://www.aspforums.net/Threads/182381/String-was-not-recognized-as-a-valid-DateTime/http://www.aspforums.net/Threads/182381/String-was-not-recognized-as-a-valid-DateTime/Tue, 20 Mar 2012 01:03:25 GMTRemoting in .net<p>I have made an application and i want to access it from client remotely can anyone suggest me any good link or any ideas to have a go at it,any help appreciated</p>http://www.aspforums.net/Threads/758401/Remoting-in-net/http://www.aspforums.net/Threads/758401/Remoting-in-net/Wed, 25 Apr 2012 01:29:25 GMTRegular expression calculation.<p>Hi</p> <p>I need a code to evaluate the regular expression without using any build in function.</p> <p>If i enter the following "2*5*(2+5)" in the text box, it should automatically evaluate and display the result in the other text box.</p> <p>&nbsp;</p> <p>Thanks in advance.</p>http://www.aspforums.net/Threads/162974/Regular-expression-calculation/http://www.aspforums.net/Threads/162974/Regular-expression-calculation/Tue, 17 Apr 2012 03:31:23 GMTPassing Null value to integer<p>Hi . Actually Iam performng a sql operation after which i get a return value as integer....</p> <p>but since when data doesmot exists then , it returns null or nothing .... but when i pass this value to integer var..... iam getting a error&nbsp;</p> <p>i.e object reference not set to an instance of an object</p> <p>can u please help me hw can i pass a null value to integer and check whether anything exists or not....</p>http://www.aspforums.net/Threads/807903/Passing-Null-value-to-integer/http://www.aspforums.net/Threads/807903/Passing-Null-value-to-integer/Fri, 16 Mar 2012 23:45:10 GMTIndex was outside the bounds of array<pre class="brush: csharp">public static void Main() { int[] number={1,1,3,3,3,5,5,5,9,9,9,9}; int n = number.Length; for (int i = 0; i &lt; n; i++) { if (number[i] != number[i + 1]) { Console.WriteLine(number[i]); } } }</pre> <p>Please correct me</p>http://www.aspforums.net/Threads/943497/Index-was-outside-the-bounds-of-array/http://www.aspforums.net/Threads/943497/Index-was-outside-the-bounds-of-array/Tue, 26 Jun 2012 04:15:20 GMTImage type in asp.net<p>In c#, for colored image, we use Image&lt;Bgr,Byte&gt; .&nbsp; i want to use this functionality in asp.net. How do i write it in asp.net?</p>http://www.aspforums.net/Threads/893276/Image-type-in-aspnet/http://www.aspforums.net/Threads/893276/Image-type-in-aspnet/Mon, 18 Jun 2012 23:38:22 GMTHow to pass string value from Public Class to public partial class in C#<pre class="brush: csharp">Hi,<br /> I am having one Method like below in public class,I just need to retrieve one string value(res[0])in another public partial class(page class).<br />Any help could be greatly Thankful.<br /><br />public SMSResultStatusEnum SendSMS(StringBuilder mobilenumber, string message, string Language) { string Unicode; string SMSUsername = AppSettingsManager.Instance.SMSUsername; string SMSPassword = AppSettingsManager.Instance.SMSPassword; string SMSSenderID = AppSettingsManager.Instance.SMSSenderID; string correctedmobilenumber = CorrectMobileNumber(mobilenumber); ///@todo: REMOVE THIS IN PRODUCTION! //return // SMSResultStatus.SUCCESSFUL; if (Language.ToLower() == &#34;english&#34;) { Unicode = &#34;E&#34;; } else { Unicode = &#34;U&#34;; message = ToHexString(message); } //Uri uri = new Uri(&#34;http://59.162.167.52/api/MessageCompose?admin=imran@instareach.com&amp;user=&#34; + SMSUsername + &#34;:&#34; + SMSPassword + &#34;&amp;senderID=&#34; + SMSSenderID + &#34;&amp;receipientno=&#34; + correctedmobilenumber + &#34;&amp;msgtxt=&#34; + message + &#34;&amp;state=4&#34;); Uri uri = new Uri(&#34;http://183.81.161.84:13016/cgi-bin/sendsms?username=&#34; + SMSUsername + &#34;&amp;password=&#34; + SMSPassword + &#34;&amp;to=&#34; + correctedmobilenumber + &#34;&amp;from=&#34; + SMSSenderID + &#34;&amp;text=&#34; + message); try { HttpWebRequest httpReq = (HttpWebRequest)WebRequest.Create(uri); HttpWebResponse httpResponse = (HttpWebResponse)(httpReq.GetResponse()); StreamReader reader = new StreamReader(httpResponse.GetResponseStream()); string tmp = reader.ReadToEnd(); string[] res = tmp.Split(&#39;&amp;&#39;); //string Result = tmp.Substring(0, 8) + &#34;&#34;.ToString(); httpResponse.Close(); //SMSResultStatusEnum statusCode = (SMSResultStatusEnum)SMSResultStatusEnum.Successfull; if (res[0] == &#34;status=0&#34;) { SMSResultStatusEnum statusCode = (SMSResultStatusEnum)SMSResultStatusEnum.Successfull; return statusCode; } else if (res[0] == &#34;status=1&#34;) { SMSResultStatusEnum statusCode = (SMSResultStatusEnum)SMSResultStatusEnum.AuthorisationFailed; return statusCode; } else if (res[0] == &#34;status=28&#34;) { SMSResultStatusEnum statusCode = (SMSResultStatusEnum)SMSResultStatusEnum.InvalidDestinationNumber; return statusCode; } else { SMSResultStatusEnum statusCode = (SMSResultStatusEnum)SMSResultStatusEnum.OtherProblems; return statusCode; } //return statusCode; } catch { return SMSResultStatusEnum.OtherProblems; } }</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/163835/How-to-pass-string-value-from-Public-Class-to-public-partial-class-in-C/http://www.aspforums.net/Threads/163835/How-to-pass-string-value-from-Public-Class-to-public-partial-class-in-C/Thu, 02 Aug 2012 03:44:15 GMTHow to convert PPT to Images in dotnet without using interop dll<p>Hi Experts,</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Iam trying to convert .ppt to Images in the .net without using Microsoft.Office.Interop.PowerPoint dll,</p> <p>could any help me is dere any other com objects to achive ppt to image ??</p> <p>Thanks in advance.</p>http://www.aspforums.net/Threads/117717/How-to-convert-PPT-to-Images-in-dotnet-without-using-interop-dll/http://www.aspforums.net/Threads/117717/How-to-convert-PPT-to-Images-in-dotnet-without-using-interop-dll/Wed, 09 May 2012 02:17:12 GMTHow do Structs differ from a class in C#<p>give sample example and demo example.</p> <p>for structs which differ from class in C#</p>http://www.aspforums.net/Threads/988473/How-do-Structs-differ-from-a-class-in-C/http://www.aspforums.net/Threads/988473/How-do-Structs-differ-from-a-class-in-C/Wed, 17 Jul 2013 02:04:34 GMTGetting the string value<p>Hi</p> <p>I need to get the string value from another method.how to do?</p> <p>Thans</p>http://www.aspforums.net/Threads/498940/Getting-the-string-value/http://www.aspforums.net/Threads/498940/Getting-the-string-value/Mon, 26 Mar 2012 01:39:29 GMTGet Number of months between two dates in C#<p>private static int monthDifference(DateTime startDate, DateTime endDate)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int monthsApart = 12 * (startDate.Year - endDate.Year) + startDate.Month - endDate.Month;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Math.Abs(monthsApart);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p>&nbsp;</p> <p>i hve the above code but i am not gettig the correct value</p>http://www.aspforums.net/Threads/289493/Get-Number-of-months-between-two-dates-in-C/http://www.aspforums.net/Threads/289493/Get-Number-of-months-between-two-dates-in-C/Fri, 08 Jun 2012 04:48:03 GMTGenerate Random File name in C#<p>I want to know is there a method to generate random file names in c#</p>http://www.aspforums.net/Threads/210583/Generate-Random-File-name-in-C/http://www.aspforums.net/Threads/210583/Generate-Random-File-name-in-C/Thu, 02 Feb 2012 00:46:18 GMTExplanation for delegate in C# with example<p>example for delegate in C# with demo example</p>http://www.aspforums.net/Threads/468178/Explanation-for-delegate-in-C-with-example/http://www.aspforums.net/Threads/468178/Explanation-for-delegate-in-C-with-example/Tue, 16 Jul 2013 02:24:53 GMTEnumeration as return type of a function<p>This is a class having enumeration... there is one function with return time enumeration...<br />I want to access this method on a button's click event... how do I call this function.. and in which type of variable I retrieve the result???<br />Please guide me...<br />Thanks in advance!<br /><br /><br />&nbsp;</p> <pre class="brush: csharp">public class ComparingImages { public enum CompareResult { ciCompareOk, ciPixelMismatch, ciSizeMismatch }; public static CompareResult Compare(Bitmap bmp1, Bitmap bmp2) { ........... return cr; } } } </pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/132113/Enumeration-as-return-type-of-a-function/http://www.aspforums.net/Threads/132113/Enumeration-as-return-type-of-a-function/Sat, 30 Jun 2012 07:06:43 GMTddmmyyyy hh:mm:ss DateTime format in C#<p>i have a text box where in&nbsp; i want to display time in hh:mm format</p> <p>i have the code forhe same as</p> <p>&nbsp;if (!DateTime.TryParseExact(txtatime.Text, "hh:mm", null, System.Globalization.DateTimeStyles.None, out Test4) == true)</p> <p>{</p> <p>error msg</p> <p>}</p> <p>in db i have values as 1900-01-01 00:00:00</p> <p>but in textbox i get 12:00 AM</p> <p>&nbsp;</p> <p>&amp; error as format shldbe in HH:mm</p>http://www.aspforums.net/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/http://www.aspforums.net/Threads/109578/ddmmyyyy-hhmmss-DateTime-format-in-C/Fri, 09 Mar 2012 06:48:19 GMTCount occurrences of character in string in C#<p>Hi</p> <p>I like to create a small program that print the number of each character and print it.</p> <p>Let me more explicit.</p> <p>My name is Vasanth.</p> <p>And the result i expect is</p> <p>V - 1</p> <p>a - 2</p> <p>s - 1</p> <p>n - 1</p> <p>t - 1</p> <p>h - 1&nbsp;</p> <p>I need to acheive this with minimun number of loops.</p> <p>Can any one suggest an idea for this.</p>http://www.aspforums.net/Threads/621937/Count-occurrences-of-character-in-string-in-C/http://www.aspforums.net/Threads/621937/Count-occurrences-of-character-in-string-in-C/Mon, 16 Apr 2012 06:21:09 GMTConvert ppt to image using any thiry party dll<p>Hi Experts ,</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Iam trying to convert ppt to images using third party dll like <span style="font-family: 'Courier New'; color: gray; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">Aspose.Slides.Pptx </span></p> <p><span style="font-family: 'Courier New'; color: gray; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><span style="font-family: Verdana; color: #000000;">Like that we have any other third party dll's are dere ??Iam looking mainly licence cost?</span></span></p> <p><span style="font-family: 'Courier New'; color: gray; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><span style="font-family: Verdana; color: #000000;">Thanks in advance.</span></span></p>http://www.aspforums.net/Threads/376670/Convert-ppt-to-image-using-any-thiry-party-dll/http://www.aspforums.net/Threads/376670/Convert-ppt-to-image-using-any-thiry-party-dll/Thu, 10 May 2012 04:36:48 GMT