tag:blogger.com,1999:blog-69540808899530984232024-03-12T20:34:52.545-04:00TechnoBloggers' BlogTechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-6954080889953098423.post-67850865926995297472018-10-07T12:56:00.001-04:002018-10-08T10:17:21.397-04:00The battle of the neighborhoods<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Introduction</span></div>
<b id="docs-internal-guid-b925fd39-7fff-5831-9e89-f701a3044cd7" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The project is done for the client “Cuppa-Bliss Inc” since they wanted to open a new branch of their coffee shops</span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">in New York city. We were asked to find out the top 5 neighborhoods where they could open a new shop. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Data</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">The data required is the location of the coffee shops in each neighborhood. To gather the information we used </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">the neighborhoods information from the JSON file provided and we used four squares to find how many coffee </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">shops are there. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Methodology</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">With the data as described above, we did the data preparation first. Along with the JSON file, we used </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">four squares to find how many coffee shops are there. Then we filtered the neighborhoods with more </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">no. of Coffee shops, and got a list of neighborhood with only one coffee shop available. Also, the client </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">mentioned that they would not want to open the coffee shop where there is a StarBucks in the area. We </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">also excluded the areas with StarBucks on the analysis.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Finally the k means algorithm was applied to get the clusters of the neighborhoods.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Results</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">We got the following result : </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><img height="174" src="https://lh3.googleusercontent.com/hNnOAP1mvMahF7YHxKaKxoDbvAp6Co2Ud3Pj2HcvVoqelBvfPFegAhbiY-IGAILJUEOuC8cgokIdoSSsACCIC5VBPUlPhCz03fdLkLnhg37HfxVJsYHyTDRVCU1QGbKKPykTZFgn" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="488" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;"><br /></span>
<span style="font-family: "arial";"><span style="font-size: 18.6667px; white-space: pre;">The map to show the clusters :</span></span><br />
<span id="docs-internal-guid-1d5a0633-7fff-8367-6cd4-d2ecf46786cc"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><img height="469" src="https://lh3.googleusercontent.com/pT-g-1kwgLE_0sIlm1Vdxmw1AzEjpzMukLXx4Khnu3GeWqT4wFUNRA0GNfNx0q52HRpJKIR4E_BV6rr6uj2fPtJfYzkJ6BhnKbf34WSQqU6wdl5bsMWIfQYcPk6wBlrcXJ2v8_pk" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="541" /></span></span><br />
<span style="font-family: "arial";"><span style="font-size: 18.6667px; white-space: pre;"><u><br /></u></span></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Discussion </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">K-Means algorithm was used because it was a clustering problem. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 13.999999999999998pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre;">Conclusion</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">As per the analysis, we advised the client “Cuppa-Bliss Inc” to open the coffee shop at Kingsbridge </span><br />
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">neighborhood in Bronx. </span></div>
<br />
* This report is done as an assignment.TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.comtag:blogger.com,1999:blog-6954080889953098423.post-55262805390084182552010-08-19T12:40:00.000-04:002010-08-19T12:40:03.838-04:00Facebook's new feature : "Check In"<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAB7JCyTdAy8TcKXn2N5E8FpA2sFNF-8lBJFGxHQE5MsaNwudtl5cJ50DRYw7x3_4-GY-pQh_wbF5xOKCqBUjQivJWDOITriNtkCKqL7bIVm2DcAPsYWxouyj42ZMH-8ZY_PKQ3irdzI/s1600/facebook_logo-2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAB7JCyTdAy8TcKXn2N5E8FpA2sFNF-8lBJFGxHQE5MsaNwudtl5cJ50DRYw7x3_4-GY-pQh_wbF5xOKCqBUjQivJWDOITriNtkCKqL7bIVm2DcAPsYWxouyj42ZMH-8ZY_PKQ3irdzI/s200/facebook_logo-2.png" width="200" /></a></div>The social-network giant facebook's new feature "Check in" now allows its mobile users to let their friend know where they are, just by tapping a button.<br />
<br />
The company representative <a href="http://www.facebook.com/michaelsharon?ref=blog">Michael Eyal Sharon</a> has written "Starting today, you can immediately tell people about that favorite spot with Facebook Places. You can share where you are and the friends you're with in real time from your mobile device." in the<a href="http://blog.facebook.com/blog.php?post=418175202130"> facebook blog</a>. <br />
<br />
It was announced just yesterday, at Aug 18th, 2010. This feature is not yet being used bu the massive population of facebook users. Although, the company and its staffs seem to be looking forward to the very positive responses, only time will say, how the people react and how will they adopt this new feature.TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-30315799914505164142010-02-19T11:10:00.003-05:002010-02-19T11:20:32.280-05:00Sorting Gridview columns in Asp .NET<div class="MsoNormal" style="line-height: normal;"><span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">I like the gridview control most, to display the data of the database table at the webpage. It has so many features and extensions, which makes programming easier and interesting.</span></span><br />
<span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span></div><div class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">In this article I will show you the method to sort gridview columns. First of all, define the grid view control as follows: (You can have your own colors and formats, but do not forget to mention </span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">AllowSorting</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True" </span></span><span class="Apple-style-span" style="font-size: small;">and mention the function name in onsorting property as </span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">onsorting</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="OnSort” </span></span><span class="Apple-style-span" style="font-size: small;">. Onsort is the name of my function, you can have some other name of the function)<o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">GridView</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ID</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="mygrid"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">runat</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="server"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">CellPadding</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="4"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#333333"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">AllowPaging</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">AllowSorting</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">AutoGenerateColumns</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="False"</span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">PageSize</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="15"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">style</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="position: static; clear: both; display: block;"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">onsorting</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="OnSort"></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">Columns</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">BoundField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">DataField</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="id"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">HeaderText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="ID"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">SortExpression</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="id"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">BoundField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">DataField</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="name"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">HeaderText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Name"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">SortExpression</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="name"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span><br />
<span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">BoundField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">DataField</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="address"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">HeaderText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="address"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">SortExpression</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="address"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">ButtonField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">buttontype</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Link"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">commandname</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="add"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Text</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Add"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">ButtonField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">buttontype</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Link"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">commandname</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="update"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Text</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Update"</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">ButtonField</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">buttontype</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Link"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">commandname</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="delete"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Text</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Delete"</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-size: small;"><span style="color: blue;"></span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">Columns</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">RowStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#FFFBD6"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#333333"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">FooterStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#990000"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="White"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Font-Bold</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">PagerStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#333333"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">HorizontalAlign</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Center"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#FFCC66"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">SelectedRowStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#FFCC66"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Font-Bold</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Navy"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">HeaderStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="#990000"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Font-Bold</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="True"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">ForeColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="White"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">AlternatingRowStyle</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">BackColor</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="White"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">PagerSettings</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">FirstPageText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">=""</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">LastPageText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">=""</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">NextPageText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">=""</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">PreviousPageText</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">=""</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">PageButtonCount</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="3"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: red;"><span class="Apple-style-span" style="font-size: small;">Position</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">="Top"</span></span><span class="apple-converted-space"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">/></span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-size: small;"><span style="color: blue;"></span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">asp</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">:</span></span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">GridView</span></span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">><o:p></o:p></span></span><br />
<span style="color: blue;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span></div><div style="margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;">Now on the code behind page, you need to write functions and property to make the sorting work properly. I wrote the functions and property as follows: <o:p></o:p></span></div><span class="Apple-style-span" style="font-size: small;"><br />
</span><br />
<div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Public</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Property</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">GridViewSortDirection()</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SortDirection<o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Get</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">If</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ViewState(</span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"sortDirection"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">)</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Is</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Nothing</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Then</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> ViewState(</span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"sortDirection"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">) = SortDirection.Ascending</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">If</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Return</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">CType</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">(ViewState(</span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"<wbr></wbr>sortDirection"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">), SortDirection)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Get</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Set</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">(</span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Value</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SortDirection)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> ViewState(</span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"sortDirection"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">) = value</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Set</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Property</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal;"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Times New Roman', serif;"></span>This property figures the direction out. The default direction is “Ascending”, but if the column is already being sorted once, then it changes to direction to “Descending”. This way we can sort our columns both in ascending and descending order. <o:p></o:p></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Protected</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Sub</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> O</span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">nSort(</span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">sender</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Object</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">,</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">e</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">GridViewSortEventArgs)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">sortExpression</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">String</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">= e.SortExpression</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">If</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">GridViewSortDirection = SortDirection.Ascending</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Then</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> GridViewSortDirection = SortDirection.Descending</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> SortGridView(sortExpression,</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"DESC"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Else</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> GridViewSortDirection = SortDirection.Ascending</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> SortGridView(sortExpression,</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"ASC"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">If</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span></div><div style="margin-bottom: .0001pt; margin: 0in;"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Sub</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">This is the function which is called at the “onsorting” event of the gridview. <o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Private</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Sub</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SortGridView(</span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">sortExpression</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">String</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">,</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">direction</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">String</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SQL</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">String</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">=</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"select id, name, address from people"</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">da</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SqlDataAdapter =</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">New</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">SqlDataAdapter(SQL, MyConnection)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">ds</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">New</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">DataSet</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> da.Fill(ds,</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">"people"</span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">dt</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">DataTable = ds.Tables(0)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Dim</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">dv</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">DataView =</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">New</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">DataView(dt)</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> dv.Sort = sortExpression &</span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: #a31515; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">" "</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">& direction</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> mygrid.DataSource = dv</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> mygrid.DataBind()</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"> <o:p></o:p></span></span><br />
<span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span class="apple-converted-space"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End</span></span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Sub</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Times New Roman', serif;"></span>This function binds the gridview again. <o:p></o:p></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">In case you are doing something at the rowcommand event of the gridview, this may generate a runtime error. Because, whenever, you click on the gridview column, to sort it, the control goes to the rowcommand event first. To avoid the control trying to execute the code in rowcommand, I did the following:<o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Protected</span></span><span style="font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">Sub</span></span><span class="Apple-style-span" style="font-size: small;"> mygrid_RowCommand(</span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="Apple-style-span" style="font-size: small;"> sender </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="Apple-style-span" style="font-size: small;"> </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">Object</span></span><span class="Apple-style-span" style="font-size: small;">, </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">ByVal</span></span><span class="Apple-style-span" style="font-size: small;"> e </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">As</span></span><span class="Apple-style-span" style="font-size: small;"> System.Web.UI.WebControls.GridViewCommandEventArgs) </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">Handles</span></span><span class="Apple-style-span" style="font-size: small;"> mygrid.RowCommand<o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">If</span></span><span style="font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> (e.CommandArgument <> </span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">"id"</span></span><span class="Apple-style-span" style="font-size: small;"> </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">And</span></span><span class="Apple-style-span" style="font-size: small;"> e.CommandArgument <> </span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">"name"</span></span><span class="Apple-style-span" style="font-size: small;"> </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">And</span></span><span class="Apple-style-span" style="font-size: small;"> e.CommandArgument <> </span><span style="color: #a31515;"><span class="Apple-style-span" style="font-size: small;">"address"</span></span><span class="Apple-style-span" style="font-size: small;">) </span><span style="color: blue;"><span class="Apple-style-span" style="font-size: small;">Then<o:p></o:p></span></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">‘Do whatever you want to do……………………’<o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">End If</span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="color: blue; font-family: 'Courier New';"></span>End</span><span class="apple-converted-space"><span style="color: black; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span style="color: blue; font-family: 'Courier New';"><span class="Apple-style-span" style="font-size: small;">Sub </span></span><span style="color: black;"><span class="Apple-style-span" style="font-size: small;"><o:p></o:p></span></span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><span style="font-family: 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: small;">In this way, I am able to sort the columns of the gridview.<o:p></o:p></span></span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"><br />
</div>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-25506674661291107662010-01-27T09:34:00.006-05:002010-01-27T22:08:57.043-05:00“Apple tablet”: How will it look like?<div class="MsoNormal">People are talking about “Apple tablet”. We can see so many news, views, rumors and speculations regarding “Apple tablets” these days. Many designers are sketching their ideas of Apple tablet. I googled “apple tablet” and saw so many pictures about the product which is not even released.<br />
</div><div class="MsoNormal"><o:p> I am wondering what will be the name of the tablet, may be something like iTablet (like iPhone, iPod. People are also saying that the name might be iSlate). This might be the fusion of iPod and iPhone in one, or might be way more powerful and useful than those, or might be just another model of Mac book Pro. </o:p><br />
</div><div class="MsoNormal"><o:p> I am also wondering how this highly anticipated gadget will look like. Will it look like one of <a href="http://www.businessinsider.com/what-will-the-apple-tablet-look-like-2009-10#perhaps-an-external-keyboard-like-old-pdas-had-11">these</a>? Will it bring a new technological breakthrough or it will be just another gadget? I hope Mr. Jobs announces the new gadget soon, and I will get all my answers. :-)</o:p><br />
</div><div class="MsoNormal"><br />
</div>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com1tag:blogger.com,1999:blog-6954080889953098423.post-59186392603056789292009-12-08T12:05:00.001-05:002009-12-08T12:05:47.414-05:00Techno-Quotes<span style="font-family: Arial; font-size: small;"><span style="font-size: 13px;"></span></span><br />
<span style="font-family: Arial; font-size: small;"><span style="font-size: 13px;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJX5tgNmZM6Dvh1Q6tx6fdyon1Vv5LoTkfuuZEt_lVHfKLH23hXqlNti2z3vzpPL_14HzaxMabPmZfRDwZidzROMoZmyRahmVXof2Jwn3vRwmwdmM0HcDWDEDCjDRuK1yDxJCIZx-hpps/s1600-h/programmer-comics-sudo-make-me-a-sandwich.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJX5tgNmZM6Dvh1Q6tx6fdyon1Vv5LoTkfuuZEt_lVHfKLH23hXqlNti2z3vzpPL_14HzaxMabPmZfRDwZidzROMoZmyRahmVXof2Jwn3vRwmwdmM0HcDWDEDCjDRuK1yDxJCIZx-hpps/s320/programmer-comics-sudo-make-me-a-sandwich.jpg" width="320" /></a>- "I do not fear computers. I fear lack of them". Isaac Asimov<br />
<br />
- "Artificial Intelligence usually beats natural stupidity".Author Unknown<br />
<br />
- "Physics is the universe’s operating system." Steven R Garman<br />
<br />
- "I sit looking at this damn computer screen all day long, day in and day out, week after week, and think: Man, if I could just find the 'on' switch..." Zachary Good.<br />
<br />
- "Hardware: where the people in your company's software section will tell you the problem is. Software: where the people in your company's hardware section will tell you the problem is." Dave Barry<br />
<br />
- "The question of whether computers can think is like the question of whether submarines can swim." Edsger W. Dijkstra<br />
<br />
-"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."Stephen Hawking<br />
<br />
- "Any fool can use a computer. Many do." Ted Nelson<br />
<br />
- "Computing is not about computers any more. It is about living." Nicholas Negroponte<br />
<br />
- "In God we trust, all others we virus scan." Author Unknown<br />
<br />
References:<br />
<a href="http://www.devtopics.com/101-more-great-computer-quotes/">http://www.devtopics.com/101-more-great-computer-quotes/</a><br />
<a href="http://www.quotegarden.com/computers.html">http://www.quotegarden.com/computers.html</a><br />
<a href="http://www.devtopics.com/101-great-computer-programming-quotes/">http://www.devtopics.com/101-great-computer-programming-quotes/</a><br />
<a href="http://www.gdargaud.net/Humor/QuotesComputer.html">http://www.gdargaud.net/Humor/QuotesComputer.html</a><br />
</span></span><br />
<span style="font-family: Arial; font-size: small;"><span style="font-size: 13px;"><div><br />
</div></span></span><span style="color: #321d02; font-family: georgia, 'bookman old style', 'palatino linotype', 'book antiqua', palatino, 'trebuchet ms', helvetica, garamond, sans-serif, arial, verdana, 'avante garde', 'century gothic', 'comic sans ms', times, 'times new roman', serif;"><span style="border-collapse: collapse;"><br />
</span></span><br />
<span style="color: #321d02; font-family: georgia, 'bookman old style', 'palatino linotype', 'book antiqua', palatino, 'trebuchet ms', helvetica, garamond, sans-serif, arial, verdana, 'avante garde', 'century gothic', 'comic sans ms', times, 'times new roman', serif;"><span style="border-collapse: collapse;"><br />
</span></span><br />
<span style="color: #333333; font-family: Verdana, Helvetica, sans-serif;"><span style="font-size: small;"><i><br />
</i></span></span>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com1tag:blogger.com,1999:blog-6954080889953098423.post-31149227897038605252009-07-20T12:59:00.000-04:002009-07-20T12:59:27.069-04:00Passing parameters programmatically to Crystal report<span style="font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px;">It is very easy to pass the parameters in Crystal reports editing the crystal reports ( just by adding the required parameters on the report and making "EnableParameterprompt = "True" " in the properties of the crystal report viewer. , but it has several drawbacks, like the parameters do not get added to the report automatically, we can not really modify the interface of parameter prompt and so on. </span></span><div><span style="font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px;"><br />
</span></span></div><div><span style="font-family: Arial; font-size: small;"><span class="Apple-style-span" style="font-size: 13px;"><div class="MsoNormal"><o:p>Today we are discussing about the parameter passing to crystal reports <span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; white-space: pre;">programmatically. <span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: separate; white-space: normal;"> </span></span></o:p></div><div class="MsoNormal"></div><div class="MsoNormal">In .aspx page, drag the control to ask for the parameters and drag the control for <st1:place w:st="on"><st1:city w:st="on">Crystal</st1:city></st1:place> report viewer as follows:</div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">table</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">tr</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: red;">style</span><span style="color: blue;">="vertical-align: top; text-align: left; height: 21px;"><</span><span style="color: #a31515;">asp</span><span style="color: blue;">:</span><span style="color: #a31515;">Label</span> <span style="color: red;">ID</span><span style="color: blue;">="lbl1"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">Text</span><span style="color: blue;">="Choose the semester"</span> <span style="color: red;">style</span><span style="color: blue;">="vertical-align: top; text-align: left"</span> <span style="color: blue;">/></span><span style="color: #a31515;">td</span><span style="color: blue;">><o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: red;">style</span><span style="color: blue;">="height: 21px; vertical-align: top; text-align: left;"><</span><span style="color: #a31515;">asp</span><span style="color: blue;">:</span><span style="color: #a31515;">DropDownlist</span> <span style="color: red;">ID</span><span style="color: blue;">="drpSemester"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">AppendDataBoundItems</span><span style="color: blue;">="True"</span> <span style="color: red;">DataSourceID</span><span style="color: blue;">="SqlDataSource1"</span> <span style="color: red;">DataTextField</span><span style="color: blue;">="Semester"</span> <span style="color: red;">DataValueField</span><span style="color: blue;">="Semester"/></span><span style="color: #a31515;">td</span><span style="color: blue;">><o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"></span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">tr</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">asp</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">:</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SqlDataSource </span><span style="color: red; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">ID</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">="SqlDataSource1"</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">ConnectionString="" SelectCommand</span><span style="color: blue;">="SELECT [Semester] FROM [SemesterInformation] ORDER BY [BeginDate], [EndDate]"><o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"></span><span style="color: #a31515;">asp</span><span style="color: blue;">:</span><span style="color: #a31515;">SqlDataSource</span><span style="color: blue;">><o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">tr</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">td</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">asp</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">:</span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">Button</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: red;">ID</span><span style="color: blue;">="cmdGenreport"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">Text</span><span style="color: blue;">="Generate Report"</span> <span style="color: blue;">/></span><span style="color: #a31515;">td</span><span style="color: blue;">></span><span style="color: #a31515;">tr</span><span style="color: blue;">><o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"></span><span style="color: #a31515; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">table</span><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">><o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;"><</span><span style="color: #a31515;">CR</span><span style="color: blue;">:</span><span style="color: #a31515;">CrystalReportViewer</span> <span style="color: red;">ID</span><span style="color: blue;">="myCrystalReportViewer"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span> <span style="color: red;">AutoDataBind</span><span style="color: blue;">="True"<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="color: red;">Height</span><span style="color: blue;">="1039px"</span> <span style="color: red;">ReportSourceID</span><span style="color: blue;">="CrystalReportSource1"</span> <span style="color: red;">Width</span><span style="color: blue;">="901px"</span> <span style="color: red;">style</span><span style="color: blue;">="position: absolute"</span> <span style="color: red;">EnableDatabaseLogonPrompt</span><span style="color: blue;">="false"</span> <span style="color: red;">EnableParameterPrompt</span><span style="color: blue;">="false"</span> <span style="color: blue;">/><o:p></o:p></span></span></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span></span></div><div class="MsoNormal"></div><div class="MsoNormal">Design a report with parameters. To add a parameter in a report, you have to go to the “Database expert”, in the command edit box, you will see “parameter list” at the right hand side of the box, create a new parameter there and include that in your query. Add the following code in the load event of your page:</div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> CRreport <span style="color: blue;">As</span> <span style="color: blue;">New</span> ReportDocument<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">If</span> Session(<span style="color: #a31515;">"report1"</span>) <span style="color: blue;">IsNot</span> <span style="color: blue;">Nothing</span> <span style="color: blue;">Then<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>CRreport = Session(<span style="color: #a31515;">"report1"</span>)<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myCrystalReportViewer.ReportSource = CRreport<o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">If<o:p></o:p></span></span></div><div class="MsoNormal">In the click event if the “cmdgenerateReport” Button add the following code:</div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> myConnectionInfo <span style="color: blue;">As</span> ConnectionInfo = <span style="color: blue;">New</span> ConnectionInfo()<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> strReportName <span style="color: blue;">As</span> <span style="color: blue;">String</span> = <span style="color: #a31515;">""<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> cryRep <span style="color: blue;">As</span> <span style="color: blue;">New</span> ReportDocument<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myConnectionInfo.DatabaseName = <span style="color: #a31515;">"Databasename"<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myConnectionInfo.ServerName = <span style="color: #a31515;">"Servername"<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>myConnectionInfo.UserID = <span style="color: #a31515;">"Username"<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myConnectionInfo.Password = <span style="color: #a31515;">"password"<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myConnectionInfo.Type = ConnectionInfoType.SQL<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>report.Load(Server.MapPath(<span style="color: #a31515;">"~/myreport1.rpt"</span>))<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>SetDBLogonForReport(myConnectionInfo, report)<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span><span style="color: green;">'Load Session variables with values from web-controls<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>Session(<span style="color: #a31515;">"Semester"</span>) = drpSemester.SelectedValue.ToString()<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: green;">'Load all parameter fields associated with the report into "fields" object<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> fields <span style="color: blue;">As</span> ParameterFields<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>fields = <span style="color: blue;">New</span> CrystalDecisions.Shared.ParameterFields()<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>fields = report.ParameterFields<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">For</span> <span style="color: blue;">Each</span> field <span style="color: blue;">As</span> ParameterField <span style="color: blue;">In</span> fields<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>report.SetParameterValue(field.Name, Session(field.Name))<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Next<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myCrystalReportViewer.ReportSource = report<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>Session(<span style="color: #a31515;">"report1"</span>) = report<o:p></o:p></span></div><div class="MsoNormal"></div><div class="MsoNormal"><span style="mso-no-proof: yes;">The setDBlogonForreport is as follows: <o:p></o:p></span></div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Private</span> <span style="color: blue;">Sub</span> SetDBLogonForReport(<span style="color: blue;">ByVal</span> myConnectionInfo <span style="color: blue;">As</span> ConnectionInfo, <span style="color: blue;">ByVal</span> myReportDocument <span style="color: blue;">As</span> ReportDocument)<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> myTables <span style="color: blue;">As</span> Tables = myReportDocument.Database.Tables<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> myTableLogonInfos <span style="color: blue;">As</span> TableLogOnInfos = myCrystalReportViewer.LogOnInfo<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> myTablelogonInfo <span style="color: blue;">As</span> TableLogOnInfo<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">For</span> <span style="color: blue;">Each</span> myTable <span style="color: blue;">As</span> Table <span style="color: blue;">In</span> myTables<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myTablelogonInfo = myTable.LogOnInfo<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myTablelogonInfo.ConnectionInfo = myConnectionInfo<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myTable.ApplyLogOnInfo(myTablelogonInfo)<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Next<o:p></o:p></span></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub<o:p></o:p></span></span></div><div class="MsoNormal"></div><div class="MsoNormal"><span style="mso-no-proof: yes;">To manage the proper navigation of the report include the following code in the .vb page: <o:p></o:p></span></div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Protected</span> <span style="color: blue;">Sub</span> myCrystalReportViewer_Navigate(<span style="color: blue;">ByVal</span> source <span style="color: blue;">As</span> <span style="color: blue;">Object</span>, <span style="color: blue;">ByVal</span> e <span style="color: blue;">As</span> CrystalDecisions.Web.NavigateEventArgs) <span style="color: blue;">Handles</span> myCrystalReportViewer.Navigate<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>report.FileName = Server.MapPath(<span style="color: #a31515;">"~/myreport1.rpt"</span>)<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">Dim</span> fields <span style="color: blue;">As</span> ParameterFields<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>fields = <span style="color: blue;">New</span> CrystalDecisions.Shared.ParameterFields()<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>fields = report.ParameterFields<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub<o:p></o:p></span></span></div><div class="MsoNormal"></div><div class="MsoNormal"><span style="mso-no-proof: yes;">Add the following code at the unload event of the page: <o:p></o:p></span></div><div class="MsoNormal"></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="color: blue; font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">Protected</span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"> <span style="color: blue;">Sub</span> Page_Unload(<span style="color: blue;">ByVal</span> sender <span style="color: blue;">As</span> <span style="color: blue;">Object</span>, <span style="color: blue;">ByVal</span> e <span style="color: blue;">As</span> System.EventArgs) <span style="color: blue;">Handles</span> <span style="color: blue;">Me</span>.Unload<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>myCrystalReportViewer.Dispose()<o:p></o:p></span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>GC.Collect()<o:p></o:p></span></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">End</span> <span style="color: blue;">Sub<o:p></o:p></span></span></div><div class="MsoNormal"></div><div class="MsoNormal"></div><div class="MsoNormal">In this way, you can pass as many parameters as you need to crystal reports.</div><div class="MsoNormal"></div><div class="MsoNormal">Please write comment below if you have any kinds of questions/suggestions. </div></span></span></div>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-80613098466765863132009-07-11T21:27:00.004-04:002009-07-12T12:42:46.426-04:00NepaliGal and NepaliGuy Comic StripIts just an initial try.. :-)... Please click on the comic strip below to read it properly..<br /><div class="separator" style="clear: both; text-align: left;"><a href="http://www.toondoo.com/privateView.toon?param=aWSwTF8VewM3NM4u7qaVxfDnuxtgKdflLUZg%2BhTYJbu1KMJ%2ByHBdZA%3D%3D" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img style="width: 454px; height: 210px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU7zjkdp5MzLRkwD21VKtfM30ExJzt_0c9GSWG1VVBnHbHRKsKRy_0FI2zRyUjdZqBN4RFDXciCe0aN99vdGBZatC6qIMVDLuW6rQHbNPn8bQ7nXdI9nYANS5sOWxZQA2vYraaA2zF1ac/s400/cool-cartoon-870155.png" border="0" /></a></div>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com1tag:blogger.com,1999:blog-6954080889953098423.post-63287632581591830242009-06-23T09:33:00.002-04:002009-06-23T09:34:29.678-04:00Deploying web-applications which use Crystal-ReportsCreating an installer is very much necessary to distribute the reporting applications being used in the web-application. In this section we are discussing how to deploy the web-application(which is using crystal reports) using Microsoft Visual Studio 2005.<br />1. Create a setup file<br /><br />Go to File> New Project >Setup and Deployment > Web setup project As shown in the figure below. Specify the name of the setup file and click on "OK"<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhblzgdK7_DQDYA9G4jkJQLP-ZmewqOYAhn_vXTqDjpNsosQuAgYgIgD8bUwE13zhOjDin37847Mo78jNijQbaFsHEkO6F9cXwrqUSCBLRBKwld_9B919PscI3wod6iV9YqPYX5O8h7ud8/s1600-h/pic1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhblzgdK7_DQDYA9G4jkJQLP-ZmewqOYAhn_vXTqDjpNsosQuAgYgIgD8bUwE13zhOjDin37847Mo78jNijQbaFsHEkO6F9cXwrqUSCBLRBKwld_9B919PscI3wod6iV9YqPYX5O8h7ud8/s400/pic1.bmp" /></a></div><br />2. There should be a bin folder inside "Web Application Folder" . Add references used in your project including the references used for Crystal report in the folder. You can do so by right clicking the "bin" folder and going to Add > Assembly<br /><br />3. Now, you need to add all the files of your website to the setup file. Right click on the "Web Application Folder" in the file system column or the name of the setup file on the solutions explorer; go to Add > File and add all the files of your website.<br /><br />4. Besides files and references, the special kinds of files called merge modules also need to be added to the setup file. Merge modules help us to determine the run time requirements of crystal reports such as formats of the reports. Mainly, there are three kinds of merge modules, Managed.msm, Database_Access_enu.msm and Regwiz.msm. You can download the merge modules for visual studio .net from <a href="http://resources.businessobjects.com/support/additional_downloads/runtime.asp#07">here</a>.<br /><br />5. You can add the merge modules by right clicking on your setup file at the solution explorer and go to Add > Merge Modules.<br /><br />6. After adding all three merge modules, you need to specify your licence of crystal report as well. You can get the license key by registering for Crystal reports. To register for Crystal reports, go to the crystal report menu of your crystal report application, select "Register/Change Address" and follow the wizard. You will get a licence key in your email after the successful registration.<br /><br />7. Once you get the license key, right click on the Regwiz.msm merge module file in the solution explorer, go to properties; Click on Merge module properties and paste the License key there as shown in the figure below:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXFriBiupZfvTqPIq9TonhR35M39GBg1OA9tqyeC0nsqRtXSoby3nEGYVK6S8EvggEQwxv-QBLyCDE-eqbMGtvdp1HGrLG7mueciCe4bNUYqB_JICBInDF_o2-Zcv18XRNJYoaFFU_2rE/s1600-h/pic2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXFriBiupZfvTqPIq9TonhR35M39GBg1OA9tqyeC0nsqRtXSoby3nEGYVK6S8EvggEQwxv-QBLyCDE-eqbMGtvdp1HGrLG7mueciCe4bNUYqB_JICBInDF_o2-Zcv18XRNJYoaFFU_2rE/s400/pic2.bmp" /></a></div><br />8. The addition of all the files are completed. Now, you have to specify the prerequisites of the web application. Right click your setup file in the solution explorer and go to properties. Click on the "Prerequisites" command button. Check on the top three check boxes if they are unchecked. Choose " Download prerequisites from same location as my application" radio button below. And then click on OK.<br /><br />Your web-application setup file ready now. Run the setup file on the server. If crystal report is not installed on your server, this setup file will install that first because of the prerequisites you specified. It is better to remove the previously installed crystal report ( if it is installed already), from the control panel of the server and start running the set up file.<br /><br />Please add a line here if you have any questions/confusions regarding this post and regarding the deployment of the web-application.TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-81997106942313779982009-04-21T08:17:00.007-04:002009-04-21T08:25:15.080-04:00Some Grad students' jokes<h2>You know you're a grad student when...</h2> <br /><ul class="circle"><li>you can identify universities by their internet domains. </li><li>you are constantly looking for a thesis in novels. </li><li>you have difficulty reading anything that doesn't have footnotes. </li><li>you understand jokes about Foucault. </li><li>the concept of free time scares you. </li><li>you consider caffeine to be a major food group. </li><li>you've ever brought books with you on vacation and actually studied. </li><li>Saturday nights spent studying no longer seem weird. </li><li>the professor doesn't show up to class and you discuss the readings anyway. </li><li>you've ever travelled across two state lines specifically to go to a library. </li><li>you appreciate the fact that you get to choose <em>which</em> twenty hours out of the day you have to work. </li><li>you still feel guilty about giving students low grades (you'll get over it). </li><li>you can read course books and cook at the same time. </li><li>you schedule events for academic vacations so your friends can come. </li><li>you hope it snows during spring break so you can get more studying in. </li><li>you've ever worn out a library card. </li><li>you find taking notes in a park relaxing. </li><li>you find yourself citing sources in conversation. </li><li>you've ever sent a personal letter with footnotes. </li><li>you can analyze the significance of appliances you cannot operate. </li><li>your office is better decorated than your apartment. </li><li>you have ever, as a folklore project, attempted to track the progress of your own joke across the Internet. </li><li>you are startled to meet people who neither need nor want to read. </li><li>you have ever brought a scholarly article to a bar. </li><li>you rate coffee shops by the availability of outlets for your laptop. </li><li>everything reminds you of something in your discipline. </li><li>you have ever discussed academic matters at a sporting event. </li><li>you have ever spent more than $50 on photocopying while researching a single paper. </li><li>there is a microfilm reader in the library that you consider "yours." </li><li>you actually have a preference between microfilm and microfiche. </li><li>you can tell the time of day by looking at the traffic flow at the library. </li><li>you look forward to summers because you're more productive without the distraction of classes. </li><li>you regard ibuprofen as a vitamin. </li><li>you consider all papers to be works in progress. </li><li>professors don't really care when you turn in work anymore. </li><li>you find the bibliographies of books more interesting than the actual text. </li><li>you have given up trying to keep your books organized and are now just trying to keep them all in the same general area. </li><li>you have accepted guilt as an inherent feature of relaxation. </li><li>you find yourself explaining to children that you are in "20th grade". </li><li>you start refering to stories like "Snow White et al." </li><li>you often wonder how long you can live on pasta without getting scurvy. </li><li>you look forward to taking some time off to do laundry. </li><li>you have more photocopy cards than credit cards. </li><li>you wonder if APA style allows you to cite talking to yourself as "personal communication". </li><li>you have a favourite flavour of instant noodle. </li></ul>( Source: http://www.chat.carleton.ca/~jnoakes/grad.html)<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0jJpq5rv29dKXEWO3KHq8IBTUQmi5W9SfcYTgVzoGnoWFxlRaCo2tQjR5t6QeMlNXSC8lUuCBIvWdDziYHW5rt286QpJ49r22_TKmTi_fFUkUZ-L7aaCtz6V0E_Smf39CUn-lwIjZrfo/s1600-h/phd041709s.gif"><br /></a>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-69359593045441799872009-04-20T09:23:00.003-04:002009-04-20T09:27:29.053-04:00Hi,<br /><br />This is the discussion board for .NET. Please post here if you have got any problem in .NET, we'll discuss about the problem. If you find the solution to the problem, then post the solution too, so that it will be easier for others, if they get the same problem.<br /><br />Thank you,<br />TechnobloggersnpTechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0tag:blogger.com,1999:blog-6954080889953098423.post-6142205100308179932009-04-15T10:48:00.000-04:002009-04-15T11:30:54.312-04:00ASP .NET - Development Server(Local Host) - Page Not found problem<span class="Apple-style-span" style="font-size:small;">I typically, do not use Microsoft Visual Studio 2005 from my laptop, but today I had to. I designed a simple page and tried to run that, but it said " Page can not be displayed, check your Internet Connection.. blah blah" . I searched over the internet regarding this error but most of the solutions were regarding IIS which I was not using at that time. </span><div><span class="Apple-style-span" style="font-size:small;"><br /></span></div><div><span class="Apple-style-span" style="font-size:small;">After some time I found that </span><span class="Apple-style-span" style="line-height: 21px; "><span class="Apple-style-span" style="font-size:small;"> </span></span><span class="Apple-style-span" style="line-height: 21px; "><span class="Apple-style-span" style="font-size:small;">the problem is because of IPV6 supports of ASP.NET Development Server. To disable IPV6 so that ASP.NET Development Server runs, we can do as below.</span></span></div><span class="Apple-style-span" style="color: rgb(80, 80, 80); line-height: 21px; font-family:Arial;font-size:12px;"><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=""><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style=""><span class="Apple-style-span" style="color: rgb(0, 0, 0);">1. </span></span><span class="Apple-style-span" style="color: rgb(0, 0, 0);">Go to c:\Windows\System32\Drivers\etc\.</span></span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=""><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">2. Edit file hosts. Put a ‘#’ before the rows “::1 localhost”.</span></span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=""><span class="Apple-style-span" style="font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">3. Save it.</span></span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">If you can not save the file and get some permission errors, follow the following steps:</span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">1. Run cmd as Administrator ( in Windows Vista) first. </span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">2. Go to c:\Windows\System32\Drivers\etc\ from command prompt. </span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">3. Type "Edit hosts" there</span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">4. Put a ‘#’ before the rows “::1 localhost” and save it.</span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style=";font-family:georgia;"><span class="Apple-style-span" style="font-size:small;"><span class="Apple-style-span" style="color: rgb(0, 0, 0);">After saving the file go to your visual studio, compile the website again. It will run. </span></span></span></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; margin-top: 0px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family:georgia;font-size:16px;"><br /></span></p></span>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com1tag:blogger.com,1999:blog-6954080889953098423.post-32265074142057968602009-04-15T10:26:00.000-04:002009-04-15T12:18:12.111-04:00WelcomeWelcome to our blog. <div><br /></div><div>Today, we are in the world of Information technology. People are getting more obsessed to the technological stuffs like websites, blogs and different electronic gadgets. We have started this blog to help those people who like to do programming and read about the electronic designs. </div><div><br /></div><div>Here, we are going to post the issues which we have faced and post the solutions to those issues which we implemented. You can get many technical blogs in the blogosphere, however we want to do something different. In our blog, we discuss about programming issues, Electronic issues and other issues as well. We have tried to make our blog versatile, so that you can get much more information.</div><div><br /></div><div>Please keep visiting our blog and send us your wonderful suggestions. </div><div><br /></div><div>Thank you,</div><div>Techno-Bloggers</div>TechnoBloggershttp://www.blogger.com/profile/10039451927098719014noreply@blogger.com0