January 26, 2012

Write server side asp .net code in tridion DWT

DWT has its own language, but sometime we need server side Tags in dwt tbb.

Example: Suppose you have some string and you want to format it, or want to do some operation on data which is not possible in DWT. you can use following code.



<% if(condtion) {%>

<%=String.Format("@@Variable@@","first","second")%>
<%="@@CAR@@".Replace("INR","Indian Rupee") %>
<% }%>


Keep in mind. DWT will no execute the .net code snippet, it will be rendered as its on .aspx page.

when this page is requested through browser then this asp.net code snippet executes.
& format or replace the strings etc.

if you have any question, just comment. i will try to reply ASAP






January 05, 2012

The breakpoint will not currently be hit. No symbols have been loaded for this document in visual studio in asp.net mvc or asp.net

this issue comes very often to the asp.net or asp.net mvc developer and it can waste considerable time. i have resolved this issue many times using following steps.

1) Check whether right version of code is being debugged. 
Go to iis right click on website. select open. Now match the path of this directory with the soution directory which is opened. it should match
2) Stop iis
3) Delete the temporary files form c:\windows\microsoft.net\framework\v2.0.50727\Temporary ASP.NET Files
4) Clean the solution (Right click -> clean
5) Rebuild the solution

now attach to w3c using ctrl+alt+p shortcut.

December 21, 2011

Tridion Dreamweaver Templating (DWT) Syntax

DWT  better known in Tridion is acronym of Tridion Dreamweaver Templating. Dreamweaver is product of Adobe which they acquired from Macromedia in 2005.( Note: Flash was also part of Macromedia before 2005 :))

Dreamweaver Templates has its own syntax. Its also used in SDL Tridion for accessing components and to provide support for control structures(loop) and flow structures(if/else conditions)

Dreamweaver syntax is CASE SENSITIVE
Dreamweaver used @@ syntax or ${} to access value from variable/object.


Operator Support:

  • numeric literals, string literals (double-quote syntax only), Boolean literals (true or false)
  • variable reference (see the list of defined variables later in this section)
  • field reference (the “dot” operator)
  • unary operators: +, -, ~, !
  • binary operators: +, -, *, /, %, &, |, ^, &&, ||, <, <=, >, >=, ==, !=, <<, >>
  • conditional operator: ?:
  • parentheses: ()




    More Basic and advanced topics coming soon.
    Please comment if any issue/problem




December 03, 2011

TCP IP connection Failed Address already in use

The TCP/IP connection to the host , port 1433 has failed. Error: "Address already in use: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port

Type: SQL server exception when used with ms jdbc drivers

Drivers: JDBC (sqljdbc4.jar, sqljdbc.jar) from microsoft

Solutions:
Solution 1:

In my problem i was not using JDBC pool, in configuration when i add the node for pool. after restarting the application it started working for me.

In my case error occurred in Tridion CMS.

Solution 2:
Go to: SQL Server Configuration Manager -> Protocols for SQL SQLEXPRESS,
then select Properties of TCP/IP. 
In the tab IP Addresses, set the TCPPort in section IPAll to 1433.

 

Copyright 2010 All Rights Reserved