tag:blogger.com,1999:blog-76694492619697322562024-03-13T03:05:55.752-07:00Soyuj's CornerHaving learning experience in Software Indusry, have tried my best to expose some knowledge that I have.. If possible expose some more here or add comments to make me encourage... Let me a chance to know something about you and share you technical knowledge with me, which is good for both to increase oursss..
I guess I am not trying to bind myself in Software itself... So other persons are always Welcome!!!
An Astro giant always have a Candle light Dinner....
Regards,
Soyuj Kumar..Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7669449261969732256.post-44050178935126001982007-07-27T02:04:00.000-07:002007-07-27T02:20:34.834-07:00Insert image in Html mail using .Net<p style="margin-bottom: 0in; text-align: justify;"> I guess, we all are habituated with E-Mails. Sometimes we need to transfer more information in E-Mails so we attach files, presentations, images etc. and when we need it to be more attractive and colorful then we try our hand with Html for making more colorful and attractive and insert images as necessary to make it more meaningful. </p> <p style="margin-bottom: 0in; text-align: justify;"> When we need to build this type of actions in our application, then we search for related Components and Libraries to get support from. So let's discuss about .Net supported libraries to achieve this type of action in our application. In this article we will cover the System.Net.Mail Namespace of System.dll in .Net Framework 2.0 to build a mailing application.</p><p style="margin-bottom: 0in; text-align: justify;"><br /></p><div style="text-align: justify;"> Now we are going to build a Service or Application that will Send Mail with some interesting features like; body content in html format, send to multiple recipients, send mail with attachment(s), to make it more meaningful send Html mail with Images Embedded in it, send html mail with embedded images and attachments, mail with multipart bodies etc.. </div><p style="margin-bottom: 0in; text-align: justify;"> </p><h2 class="page-title-western">A simple Html mail:</h2> <p style="margin-bottom: 0in;">Let's check a mail message created by <b><i>System.Net.Mail.MailMessage</i></b> to send a mail...</p> <p style="margin-bottom: 0in;">The codes are:</p> <p style="margin-bottom: 0in;"><u><b>Sample for Html mail:</b></u></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"><br /></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"><span style="color: rgb(0, 0, 255);font-size:85%;" > <span style="font-family:Courier New,monospace;"><span lang="">Public <span style="color: rgb(0, 0, 255);">Sub</span> SendHtmlMail()</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 128, 0);">'create the mail message</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 0, 255);">Dim</span> mail <span style="color: rgb(0, 0, 255);">As</span> <span style="color: rgb(0, 0, 255);">New</span> MailMessage(<span style="color: rgb(128, 0, 0);">"from@fromdomain.com"</span>, <span style="color: rgb(128, 0, 0);">"to@todomain.com"</span>)</span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 128, 0);">'set the message content</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang="">mail.Subject = <span style="color: rgb(128, 0, 0);">"This mail has Html Body.."</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang="">mail.Body = <span style="color: rgb(128, 0, 0);">"This is a sample body with html in it. <b>This is bold</b> <span style="color: rgb(51, 102, 153);">This is blue</span>"</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang="">mail.IsBodyHtml = <span style="color: rgb(0, 0, 255);">True</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 128, 0);">'send mail</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;" lang=""> <span style="font-family:Courier New,monospace;font-size:85%;">SendMail(mail)</span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 0, 255);">End</span> <span style="color: rgb(0, 0, 255);">Sub</span> <span style="color: rgb(0, 128, 0);">' End SendHtmlMail</span></span></span></p><p style="margin-bottom: 0in; widows: 0; orphans: 0;"><span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 128, 0);"><br /></span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"><span style="color: rgb(0, 0, 255);font-size:85%;" > <span style="font-family:Courier New,monospace;"><span lang="">Private <span style="color: rgb(0, 0, 255);">Sub</span> SendMail(<span style="color: rgb(0, 0, 255);">ByVal</span> <span style="color: rgb(0, 0, 0);">mail</span> <span style="color: rgb(0, 0, 255);">As</span> Mail.MailMessage)</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 128, 0);">'send the message using SMTP client</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 0, 255);">Dim</span> smtp <span style="color: rgb(0, 0, 255);">As</span> <span style="color: rgb(0, 0, 255);">New</span> SmtpClient(_mailServer) <span style="color: rgb(0, 128, 0);">'mail Server IP or NAME </span></span></span> </p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;" lang=""> <span style="font-family:Courier New,monospace;font-size:85%;">smtp.Credentials = CredentialCache.DefaultNetworkCredentials</span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;" lang=""> <span style="font-family:Courier New,monospace;font-size:85%;">smtp.Send(Mail)</span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"> <span style="font-family:Courier New,monospace;font-size:85%;"><span lang=""><span style="color: rgb(0, 0, 255);">End</span> <span style="color: rgb(0, 0, 255);">Sub</span> <span style="color: rgb(0, 128, 0);">' End SendMail</span></span></span></p> <p style="margin-bottom: 0in; widows: 0; orphans: 0;"><br /></p> <p style="margin-bottom: 0in; text-align: justify;"> Here "<i>mail</i>" is the instance of <b>MailMessage</b> Class. There are four overloaded constructors available initializing different properties of MailMessage Class during making instance.........</p><br /><p style="margin-bottom: 0in; text-align: justify;"><br /></p><p style="margin-bottom: 0in; text-align: left;">For more details please visit : <a href="http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET">http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET</a></p><p style="margin-bottom: 0in; text-align: left;"><br /></p><p style="margin-bottom: 0in; text-align: left;"><a href="http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET"><br /></a></p> <p style="margin-bottom: 0in; text-align: left; font-style: italic;">Thanks,</p><p style="margin-bottom: 0in; text-align: justify; font-style: italic;">Soyuj Kumar...<a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"><img alt="Coffee Drinker" src="http://smileys.smileycentral.com/cat/3/3_4_102.gif" border="0" height="83" width="83" /></a></p>Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.com2tag:blogger.com,1999:blog-7669449261969732256.post-8388367274785075782007-07-24T04:28:00.000-07:002007-07-25T02:45:28.075-07:00A Theory of Everything?<div align="center"><a href="http://bp2.blogger.com/_-0UY1rrPwAQ/Rqb5tw-_ANI/AAAAAAAAAAg/nvgrfaXZ8Jo/s200/ever_thumb_illustration.jpg"><img style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 200px; CURSOR: hand" alt="" src="http://bp2.blogger.com/_-0UY1rrPwAQ/Rqb5tw-_ANI/AAAAAAAAAAg/nvgrfaXZ8Jo/s200/ever_thumb_illustration.jpg" border="0" /></a> <span style="color:#990000;"><strong>The String theory... :<br />.<br /></strong>.<br /></span><span style="color:#ff6600;"><strong><em>Some physicists believe string theory may unify the forces of nature<br />.<br />. </em></strong></span></div><div align="justify">The fundamental particles of the universe that physicists have identified—electrons, neutrinos, quarks, and so on—are the "letters" of all matter. Just like their linguistic counterparts, they appear to have no further internal substructure. String theory proclaims otherwise. According to string theory, if we could examine these particles with even greater precision—a precision many orders of magnitude beyond our present technological capacity—we would find that each is not pointlike but instead consists of a tiny, one-dimensional loop. Like an infinitely thin rubber band, each particle contains a vibrating, oscillating, dancing filament that physicists have named a string.</div><div align="center">:</div><div align="center">.</div><div align="left"><span style="font-size:130%;"><strong>Field of dreams :</strong><br /></span></div><div align="center">.</div><div align="justify"><br /><em><span style="color:#666666;">In Einstein's day, the strong and weak forces had not yet been discovered, but he found the existence of even two distinct forces—gravity and electromagnetism—deeply troubling. Einstein did not accept that nature is founded on such an extravagant design. This launched his 30-year voyage in search of the so-called unified field theory that he hoped would show that these two forces are really manifestations of one grand underlying principle. This quixotic quest isolated Einstein from the mainstream of physics, which, understandably, was far more excited about delving into the newly emerging framework of quantum mechanics. He wrote to a friend in the early 1940s, "I have become a lonely old chap who is mainly known because he doesn't wear socks and who is exhibited as a curiosity on special occasions."</span></em></div><div align="center"><em><span style="color:#666666;">.</span></em></div><div align="justify"><em><span style="color:#666666;"></span></em></div><div align="justify">For more details please visit : <a href="http://www.pbs.org/wgbh/nova/elegant/everything.html">http://www.pbs.org/wgbh/nova/elegant/everything.html</a> </div><div align="justify"></div><div align="justify">Get the experience of String theory : <a href="http://www.pbs.org/wgbh/nova/elegant/scale.html">http://www.pbs.org/wgbh/nova/elegant/scale.html</a> </div><div align="justify"></div><div align="center">:</div><div align="center">.</div><div align="center"></div><div align="left"><span style="color:#3333ff;">Thanks,</span></div><div align="left"><span style="color:#3333ff;"></span></div><div align="left"><span style="color:#3333ff;">Soyuj Kumar...<img height="50" alt="Reading" src="http://smileys.smileycentral.com/cat/36/36_13_3.gif" width="60" border="0" /></span></div>Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.com1tag:blogger.com,1999:blog-7669449261969732256.post-663258826470970312007-06-08T10:07:00.000-07:002007-07-20T03:54:28.112-07:00CLR Triggers for SQL Server 2005:<div align="center">As I discussed in my <a href="http://www.blogger.com/">previous</a> articles, now Microsoft SQL Server 2005 is integrated with Microsoft .Net Framework common language runtime (CLR), so we can use any .Net Framework language to create database objects. The CLR provides the execution environment for all the server side objects that are created using a .NET language. This means the database developers can now perform tasks that were impossible or difficult to achieve with T-SQL alone. Especially when working with large amounts of server code, developers can easily organize and maintain their code investments. </div><div align="center">:<br />This article covers different types of triggers supported by Microsoft SQL Server 2005 with basic ideas about them with an example. At last describes the step-by-step approach to create a CLR trigger (a DML type).</div><div align="center">:</div><div align="center">.</div><div align="center"></div><div align="center"><span style="font-size:130%;"><strong><u>What is Trigger?</u></strong></span></div><div align="center"><span style="font-size:130%;">:</span><br />A trigger is a Database object just like a stored procedure, or we can say it is a special kind of Stored procedure which fires after (/before) a specified language event executes. More specifically the object which is attached to a Table or View or Database schemas for tracking the operations on them. The main difference between a trigger and a stored procedure is that the former is attached to a table or view and is fired only when an INSERT, UPDATE, and/or DELETE occurs, while a stored procedure executes at any time when it is called. </div><div align="center">:</div><div align="center">.</div><div align="center"></div><div align="center">For more details please visit : <a href="http://aspalliance.com/1273">http://aspalliance.com/1273</a></div><div align="center">. <div align="center">.</div><div align="center"></div><div align="center"></div><div align="center"></div><div align="left">Thanks,</div></div><div align="left">Soyuj Kumar.. <a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"></a><a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"><img height="83" alt="Operator" src="http://smileys.smileycentral.com/cat/23/23_33_10.gif" width="83" border="0" /></a><a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"></a> </div>Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.com1tag:blogger.com,1999:blog-7669449261969732256.post-11315494303248961252007-03-22T13:07:00.000-07:002007-07-26T00:37:53.845-07:00Creating SQL functions in VB.Net<div align="justify">This article is related to my previous article CLR integration in SQL Server 2005. This contains a step-by-step method of using Visual Studio for creating CLR based database objects. This also explains the method for debugging the managed code for CLR integrated objects and explains the CLR integrated functions. </div><div align="center">:</div><div align="justify"></div><div align="justify"></div><div align="justify">In this article I am going to discuss how to use Visual Studio 2005 for creating CLR integrated functions. In Visual Studio 2005 there is an option for creating database projects, which is very helpful in this objective.......</div><div align="center">.</div><div align="center">.</div><div align="center">.</div><div align="center"></div><div align="justify"></div><div align="justify"></div><div align="justify"></div><div align="justify"></div><div align="justify">Please visit for details : <a href="http://aspalliance.com/1157">http://aspalliance.com/1157</a></div><div align="center">.</div><div align="center">:</div><div align="center">.</div><div align="justify"></div><div align="justify"></div><div align="justify"></div><div align="justify"></div><div align="justify">Regards,<br />Soyuj Kuamr... <a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"><img alt="Techy" src="http://smileys.smileycentral.com/cat/36/36_13_10.gif" border="0" height="54" width="66" /></a> </div>Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.com2tag:blogger.com,1999:blog-7669449261969732256.post-8330040353877468562007-02-15T15:56:00.000-08:002007-07-20T03:58:12.270-07:00CLR intergation in SQL Server 2005<p align="justify">We all know how great T-SQL is for database code, but writing procedural code in T-SQL has always been difficult. It seems impossible when we need a stored procedure or two, requiring some array-operations, text-parsing or complex math operations. However, it is quite easy if our Server allows us to deploy C# or VB.NET code that is used within the Server process. In other words, if we need complex procedural code, we can write it as managed code.</p><p align="center">:</p><p align="justify">With the Common Language Runtime (CLR) hosted in Microsoft SQL Server 2005(called CLR integration), we can write stored procedures, triggers, user- defined functions, user-defined types, and user-defined aggregates in managed code. Because managed code compiles to native code prior to execution, we can achieve significant performance increases in some scenarios. Thus SQL Server essentially acts as the operating system for the CLR when it is hosted inside SQL Server....</p><p align="center">.</p><p align="justify">Please visit for more details : <a href="http://aspalliance.com/1081">http://aspalliance.com/1081</a> </p><p align="center">:</p><p align="center">.</p><p>Thanks,<br />Soyuj Kuamr... <a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"></a><a href="http://www.blogger.com/" target="_blank"></a><a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"><img height="50" alt="Reading" src="http://smileys.smileycentral.com/cat/36/36_13_3.gif" width="60" border="0" /></a><a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"></a><a href="http://www.smileycentral.com/?partner=ZSzeb001_ZRxdm103YYIN" target="_blank"></a> </p>Soyuj Kumarhttp://www.blogger.com/profile/08780620776759790836noreply@blogger.com4