tag:blogger.com,1999:blog-256627602024-03-21T08:01:07.277-07:00Dot Net Developer Notesi am writing my experiences in developing and material i read in the web to clear my doubts.Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-25662760.post-50804819175636351282022-05-21T08:00:00.003-07:002022-05-21T08:00:47.736-07:00Notice "This site uses cookies from Google to deliver its services and analyze traffic. Your IP address and user-agent are shared with Google along with performance and security metrics to ensure quality of service, generate usage statistics, and to detect and address abuse."Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-4849022983379762352015-11-01T13:39:00.000-08:002015-11-01T13:39:25.509-08:00Simple image slider using JQuery
following is the jquery code for image slider
function showImage() {
var shopImages = sessionStorage.getItem('shopImages'); // comma separated image paths
shopImage = shopImages.split(',');
Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.com0tag:blogger.com,1999:blog-25662760.post-64095862990308783852015-03-05T14:11:00.001-08:002015-03-05T14:14:38.512-08:00Update text box with drop down list selected value in angular js
Includes
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js"
Angular Script
var app = angular.module('windowExample', []);
1) we used $http service to call rest api
2) please note we will update only when the request to api is successful
app.controller('ExampleController',function ($scope, $window,$http) {
$http.get("http://restcountries.eu/rest/v1/all").success(functionSuryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-54397559939267827962015-03-05T13:51:00.001-08:002015-03-05T14:11:39.314-08:00Dot Net Developer Notes: Consume rest api from angularJS
Dot Net Developer Notes: Consume rest api from angularJS
Includes
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"
"https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular-resource.js"
Angular js Script
1) Here ngResource module is included to get $resource service
var app=angular.module('mymodule',['ngResource']);
2) We created service Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-8996118813643891082012-06-13T01:34:00.003-07:002012-06-13T01:34:57.493-07:00
While restoring a db in production server . I got a following issue
i tried to restored using wizard it failed
Error 3154: The backup set holds a backup of a database other than the existing database.
first i tried following sql command
RESTORE DATABASE AdventureWorks
FROM DISK = 'C:\BackupAdventureworks.bak'
WITH REPLACE
It raised following error
Exclusive access could not be obtained Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-48961292863477401982012-06-08T03:54:00.001-07:002012-06-08T03:55:53.806-07:00Case sensitive comparison in Sql server
to compare case sensitive fields in sql server u need to cast the fields to varbinary
then compare
for example
Scenario
select * from tbluser
username='test'
select * from tbluser
username='Test'
both of above queries will give same results
fix
select * from tbluser
cast (username as varbinary(lengthof username field)=
cast('test' as varbinary(Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-88032150476287351832012-06-01T22:21:00.003-07:002012-06-05T23:40:17.321-07:00Yesterday i got a requirement as follows
As in the screen shot depending
upon the selection in the radio
button list I need to fill drop down,
similar to cascading drop down lists
I used Jquery ajax to call database.
Following steps are used in
developing functionality
Step 1
Add using System.Web.Services; in the name space region
Add attribute [WebMethod] above the method to fill Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.com0tag:blogger.com,1999:blog-25662760.post-80238681356514374812012-05-29T09:11:00.003-07:002012-05-31T01:32:37.831-07:00
I found a e book for 70-515 Found at ebookbrowse.com
Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-12815265435120170802012-05-20T23:23:00.003-07:002012-06-02T02:11:34.048-07:00
Hi Guys,
I cleared CSM. Now Certified Scrum Master. Its fun to work with agile methodologies.
Earlier i passed MCPD in 2008
Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-40225522719199738542012-04-18T22:58:00.002-07:002012-04-18T22:58:41.335-07:00New features in Sql server 2012
Sequences
Sequences are introduced in sql server 2012 which are similar to sequences in oracle.
We can associate sequences to a column in the table. Then a question came into my mind we have already identity in sq server. Why we need another object to have auto increment column?
Sequences have following advantages over Identity
There are not related to particular table.
The are not Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-57399973883881592552009-12-31T21:46:00.000-08:002009-12-31T21:51:45.194-08:00Good article about running totals and need to store previous row valuesOn other day i am supposed to work on balance sheet calculations . I am literally dumb in such accounting things. I struggled get the ending balance, opening balance and carry forward values. I sterched my hand to get help from jeff moden( sql server central.com) He gave such a good idea which absoultely master piece.Here is the link of it. Read it http://www.sqlservercentral.com/articles/T-SQL/Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-52424503864063112182009-07-24T01:58:00.000-07:002009-07-24T01:59:31.227-07:00Few things about WCFData Contract and Data Member attributes appear in the System.Runtime.Serialization namespace, because they control the general WCF serialization of the object rather than just its xml-serialized version. The DataContract attribute is applied at the class level and it controls the serialized name of the object as well as the namespace. The DataMember attribute is applied to the specific Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-26956626140777259772009-07-24T01:51:00.000-07:002009-07-24T01:58:01.421-07:00XML serialization and data contract serailizationFirst of all Thanks for this nice article by danrigs. I am adding this to my blog as my noteshttp://www.danrigsby.com/blog/index.php/2008/03/07/xmlserializer-vs-datacontractserializer-serialization-in-wcf/XmlSerializer Advantages:1. Opt-out rather than opt-in properties to serialize. This mean you don’t have to specify each and every property to serialize, only those you don’t wan to serialize2Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-41679191612167335292009-05-19T22:51:00.000-07:002009-05-19T22:55:40.534-07:00Whats new in Caching mechanism in VS2010I read a great post reagrading caching mechanism in VS2010 today. Here is brief synopsis if you want to know more please follow this linkhttp://www.asp.net/learn/whitepapers/aspnet40/In traditional way cached content will be stored in memory, which hampers performance of heavily trafficked serversIn ASP.Net 4.0 WE can configure output cache providers. Out put cache providers use any storage Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-43600844364142840552009-04-09T00:24:00.000-07:002009-04-09T00:26:04.193-07:00Factory Design pattern - Asp.netFactory Design Pattern is already being used in Asp.net.It is useful when all related classes are grouped and we can decide which class needs to be instantiated at run time.The Factory Design pattern is used when a class cannot anticipate the type of object it must create or when you want to delegate the responsibility of creations of object to another class so that you need not worry about the Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-58657543823577136942009-03-19T22:55:00.000-07:002009-03-19T23:10:57.909-07:00tool tip div and pop up div using java scriptIn one of my module i came across the situation that i have to code for toop tip div and pop up divlet me explain what is toop tip . I have hyperlink in gridview (View Message), when user hover on it i have to show content of it.When user clicks on hyper link i need to show the div.see above screen shots java script for the tool tip java script for popup divBinding java script with control in .csSuryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-39412630626985607862009-03-19T03:49:00.000-07:002009-03-19T03:52:51.641-07:00Linq- dataset - select - many columnsI came across a situation using data set i have to select mutiple columns using LinqHere is my codecn.Open();SqlCommand cmd = new SqlCommand("Spname", cn);cmd.CommandType = CommandType.StoredProcedure;cmd.Parameters.AddWithValue("ParameterName", value);cmd.Parameters.AddWithValue("parametername", value);SqlDataAdapter da = new SqlDataAdapter(cmd);DataSet ds = new DataSet();da.Fill(ds);Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-13190150997259294452009-03-19T02:28:00.000-07:002009-03-19T02:35:59.343-07:00Linq - Data reader - selecting more than one valueI came across a situation to bind gridview with selecting data from datareader using linqI used following code.public void ShowAthletes(){cn.Open();SqlCommand cmd = new SqlCommand("SpName", cn);cmd.CommandType = CommandType.StoredProcedure;cmd.Parameters.AddWithValue("SubscriptionId", Parameter1);cmd.Parameters.AddWithValue("EMail", "parametername");SqlDataReader dr=cmd.ExecuteReader();--------Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-79871252784033000742008-11-19T19:26:00.000-08:002008-11-19T19:27:42.569-08:00Further on String type discussionfrom the article in msdnhttp://msdn.microsoft.com/en-us/library/aa691153.aspxThe string type is a sealed class type that inherits directly from object. Instances of the string class represent Unicode character strings.Values of the string type can be written as string literals (Section 2.4.4).The keyword string is simply an alias for the predefined class System.String.Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-12617419908200699612008-11-19T19:14:00.000-08:002008-11-19T19:23:20.796-08:00String vs stringRecently i had a discussion with my collegue regarding when to use .tostring() and convert.tostring(), in the discussion we are talked about string is whether value type or reference type.After having research on the web i found that string is reference type and i found differences between String and string. Conclusions i drawn from my research on given belowSources i refered arehttp://Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-23691796822885979592008-08-15T23:06:00.000-07:002008-08-15T23:07:55.493-07:00Date time vs small datetime in sql server 2005DateTimeDATETIME column (or in a variable) are stored as two four-byteintegers. The first integer represents the date, and the secondinteger represents the time.We calculate the date integer against the base date January 1,1900. The integer represents the number of days before or afterthat date. As a result, the DATETIME data type supports onlydates that are represented by the integers supported Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-5509368001920555592008-07-18T03:39:00.000-07:002008-11-13T21:07:52.944-08:00Working with Xml formats in sql server 2005XML Auto Query:SELECT * FROM dbo.Receipes_MasterFOR XML AUTO, TYPEResults: Results will be as shown figure right side Inferences: 1)For each Id column one element will be returned2) Each element will have table name as element name and columns attributes to that element3) It will have multiple root elementsXML Path Query :SELECT Receipe_Id as "RecipeId",Title,Description,Ingredients,Instructions,Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-41340938258993429632008-07-17T03:33:00.000-07:002012-05-29T06:06:40.359-07:00List of language culture supported by dot net 2.0Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.com0tag:blogger.com,1999:blog-25662760.post-3142176420818361932008-07-17T03:26:00.000-07:002008-07-17T03:27:42.728-07:00Compliation techniques in asp.net 2.0Automatic CompilationASP.NET automatically compiles your application code and any dependent resources the first time a user requests a resource from the Web site. In general, ASP.NET creates an assembly for each application directory (such as App_Code) and one for the main directory. (If files in a directory are in different programming languages, then separate assemblies will be created for eachSuryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.comtag:blogger.com,1999:blog-25662760.post-58054368780163669592008-07-17T00:28:00.000-07:002008-11-13T21:07:53.142-08:00Creating Browser filesThank you Declan Bright for your nice post in code project.comhttp://www.codeproject.com/KB/aspnet/BlackberryASPNET.aspxIn order create browser specific application we need create browser files first and register that browser files in the .net frameworkfolder using aspnet_regbrowsers.exe tool.Step 1: Creation of browser file with following properties and save it in the directory \WINDOWS\Suryahttp://www.blogger.com/profile/09045812139558657257noreply@blogger.com