Thursday, August 9, 2012

Auto Generate Serial Number in GridView

To auto generate serial number in Gridview, which we can use only for display purpose and has nothing to do with database and data related operations.

  • Add Following Column in Grid View at first position

       
       <%# ((GridViewRow)Container).RowIndex + 1%>
   
 

Above code will simply autogenerate serial number in Gridview
Submit this story to DotNetKicks

Read more...

Wednesday, August 1, 2012

Textbox with background image using CSS

We can use CSS To make stylish textboxes like rounded corner textbox or textbox with some image inside. Rounded corner text box is like following image.


To make rounded corner textbox we use following logic. We will put textbox in some wrapper layer i.e. div tag and apply style to wrapper layer.
Now style applied to wrapper div tag is as follows
.tt-wrapper
 {
 background-image:url('images/user_box.png');
 margin:0;
 width:255px;
 height:35px; 
  }
In above style user_box.png is a background image (check following image.)


 Then we apply style to fit the textbox with in wrapper div class.
.tt{
 width:240px;
 height:25px;
 margin:5px 0 0 8px;
 border:none;
 background:none;
 }
And we are done with Textbox with rounded corner. To display some image inside textbox we simply need to add background image in the class applied to textbox
Submit this story to DotNetKicks

Read more...

Install CSI files BlackBerry

I am using PhoneGap.com for BlackBerry development, after developing web app I came across a situation where I had to register my code signing key using  SignatureTool.jar, I used following line of code in Command prompt to register my key and password pair. C:\BBWP\bin>SignatureTool.jar client-RBB-YOURCSICODE.csi c:\BBWP\bin>SignatureTool.jar client-RCR-  YOURCSICODE.csi c:\BBWP\bin>SignatureTool.jar client-RRT-  YOURCSICODE.csi If you don't have a private key installed you need to create one. And use the pin number which you used during the registration process.
Submit this story to DotNetKicks

Read more...