Posts

Showing posts from 2015

SPAN Tag's width is not properly setting.

Image
HTML’s Span tag has some time an issue that when it rendered on screen, its width does not set as mentioned in code. <span id=”spnAmount” style="width:200px; text-align: right; ">120,000.00</ span>   <span id=”spnBalAmount” style="width:200px; text-align: right; ">20,000.00</ span>   Here “spnBalAmount” has width 200px but as showing in below image its width is fixed to the characters it contains To resolve this issue, add “display: inline-block;” as shown below. This will resolve the issue. <span id=”spnAmount” style="width: 200px; text-align: right; display: inline-block; ">120,000.00</ span>   <span id=”spnBalAmount” style="width: 200px; text-align: right; ">20,000.00</ span>   See in below image, after adding “display: inline-block;” span tag rendered with its actual width. You can use “display: block;” but this will make the span like &

Points related to Session_End event

Important points related to Session_End event: 1. While thinking of Session_End event one of the most important things is that the event is supported only when the session is maintained Inproc. The session_End event will not fire if you are using State server or SQL server. 2. Another important point to note is that Session_End event is fired by a worker process. This also means that Session_End event might not have all the permission that a normal page request has. So if you are trying to connect to the SQL server with Windows account, Session_End event might not have required permission, although you can connect to the SQL in Session_Start event. 3. Session_End will fire after a given amount of time where session has been inactive. The given time can be changed globally in the web.config file with the time out attribute or for individual session with the help of Session.Timeout property. 4. Session_End will also fire when someone calls the Session.Abondon method. No

Baseless Merging of different branches of your srouce code

Image
The process of merging items that are not directly branched from each other is called a  baseless merge . For example: you might want to merge a change between two release branches (Iteration 1 and Iteration 2), which are siblings of each other, without merging up to the parent branch (Main). You can only perform a baseless merge by using the  Tf merge command. In Visual Studio 2010 and prior, you cannot perform a baseless merge from within the Visual Studio IDE. But in Visual Studio 2012, this feature (Baseless merge) is integrated with VS IDE merge wizard. We will see this merge wizard in the last. Just perform following 4 steps and merge your baseless branches. Step 1 – Evaluate Whether a Baseless Merge Is Needed Step 2 – Perform a Baseless Merge Using Tf.exe Step 3 – Resolve Merge Conflicts Step 4 – Check-In the Merged Changes Before performing the merging, get latest code of both branches. Now o pen a Visual Studio command window, and r un the following Tf.exe c

“Method1 hides inherited member Method2. Use the new keyword if hiding was intended” - Compiler Warning

Usually when we compile our C# code, sometimes we see a warning message in output window: Method1 hides inherited member Method2. Use the new keyword if hiding was intended. This warning means that Method1 is declared with the same name as a method in a base class. And the new is not used. This warning informs us that we should use new modifier. using System; namespace abc { public class MyBaseClass { public int i = 1; public DataTable ViewCriteria() { // } } public class MyDerivedClass : MyBaseClass { public void ViewCriteria () // Warning Line Code { // Some New Code For Derived Class } } } Here in above code, since we don't use a new keyword therefore we will face a warning during the code compilation. To remove the warning we need to add a new modifier as shown below. public new void ViewCriteria () // Warning Line Code { // Some New Code For Derived Cla