Ok, if you don't want to use JS functions then Use below process:
Process 1:
#region PrintLogicNew
string fileName = System.IO.Path.GetFileName(Request.Path).Substring(0, System.IO.Path.GetFileName(Request.Path).Length - 5);
Utilities.Common obj_Common = new Utilities.Common();
hdfPrintCacheId.Value = fileName + Session.SessionID + "Print";
Cache.Insert(hdfPrintCacheId.Value, dvPrint, null, DateTime.MaxValue, TimeSpan.FromMinutes(Convert.ToDouble(ConfigurationSettings.AppSettings["CacheExpiryTime"])));
#endregion
Process 2:
At HTML Page
<asp:hiddenfield id="hdfPrintCacheId" runat="server" xmlns:asp="#unknown" />
<a href="#" onclick="JavaScript:openPrintWindowWithQueryString('<%=hdfPrintCacheId.Value %>');">
<img src="../Images/print.gif" style="border: none" /></a>
Above process will help you. :-D