Embed Gujarati font in website / Embed any other font in web page

Use following definition, which is pointing to a font file located on web server, and a class that has ‘font-family’ attribute with your custom defined font.

font-family: “myguj-font”;
src: url(“Gujrati-Saral-1.ttf”) format(“truetype”);
font-weight: normal;
font-style: normal;
font-family: “myguj-font”;

And your display area need just to point to a style class as follow:

<div class='myguj'>
This text will appear in Gujarati Font.

Find and download TTF, EOT, SVG, WOFF kind of font files and save in web folder, then you can refer via style sheet(css) file and embed any kind of font in your web page.

My personal website Siddharth Borania’s Personal Website


How to Read Binary Documents (in base64 binary format) by ASP.NET Web Service

Add new web service in your ASP.NET web application.

Adding a web service will create two file in your web application:

1)      ASMX FILE(For example WebService.asmx)

2)      CS FILE(in App_Code folder, like WebService.cs)

Create web method inside it as follow.  It takes document name as parameter and returns array of byte (binary data).



public Byte[] ReadDocument(string strDocumentName)


string strdocPath;

strdocPath = “D:\\TESTDIR1\\TESTDIR2″ + strDocumentName;

FileStream objfilestream = new FileStream(strdocPath,FileMode.Open,FileAccess.Read);

int docLen = (int)objfilestream.Length;

Byte[] arrDocumentContents  = new Byte[docLen];



return arrDocumentContents;



Above example reads file from a physical path on a system. You can also use Server.MapPath() for specifying virtual directory.

You can call webservice by using following like URL

http://yourdomain / WebService.asmx/ ReadDocument? strDocumentName=test.gif


Web service will return base64 binary data as follow:

<?xml version=”1.0″ encoding=”utf-8″?>

<base64Binary xmlns=”http://tempuri.org/”>R0lGODlhCAAFAIABAMaAgP///yH5BAEAAAEALAAAAAAIAAUAAAIKBBKGebzqoJKtAAA7</base64Binary&gt;

Web development small tips

Single quote in java script, may result in error

In Javascript,when using or concatenating string, use it with double quotes.
Or it may generate error.

var str="Some String" + document.getElementById("txtName").value;

Should be avoid:
var str='Some String' + document.getElementById("txtName").value;

To overcome Date format related error, in .Net, with CompareValidator validation control
You can, specify culture in web config file.

Put Share Button on your website with ADD THIS

Go to http://www.addthis.com site, and it will ask you button layout you want to Choose.
And that site will display code snippet, which will contain one SCRIPT tag and HTML lines.

So you have to add script line in your page and put ‘html’ tags at place where you want to display share icons.

To set content in tinyMCE editor box by using javascript
var editorInstance = tinyMCE.getInstanceById("ctl00_cpMain_txtCampaignDesc"); //specify clientid of textarea field
editorInstance.getBody().innerHTML = "This is dynamic text set by javascript.";

ASP.NET error BC30456: ‘CreateResourceBasedLiteralControl’ is not a member of [any file]

Recently i came across an error in asp.net web application, on a web server.

error BC30456: ‘CreateResourceBasedLiteralControl’ is not a member of [file name of master page/ control file].

I have tried to find error in many blogs and reputed site, but it did not helped.

Finally, it is solved by just Deleting the directory in which error was throwing. and again same directory uploaded to server and error gone immediately.

I think it was just error due to temporary files, or reference not updated to recent compiled version.

Hope, this helps some one facing same error.

Siddharth borania’s profile on Google

online video conversion(flv conversion) using asp.net(web development) – borania siddharth

Audio and Video files are becoming important part of web sites, now a days.

Many social networking and job portal sites are built to offer audio/video upload and play functionality.

These videos are then played in client’s browsers.

Playing video in client’s machine is preferred with FLV format rather than any other(like .wmv).

And same technology is applied for audio playing.

and as there is different format files may be uploaded by user, always there is question to weather restricting users for ONLY uploading FLV files or giving them FLEXIBILITY to upload file in their desired(available) format, and online convert it into FLV.

So, here i have present small code snippet, to outline how FLEXIBILITY may be given to user for uploading any audio/video format, and same time its playable by website.

string strinp;
strinp = Server.MapPath(“~/test1.wmv”).ToString();

string strop;
strop = Server.MapPath(“~/test2.flv”);

Process p;
ProcessStartInfo info = new ProcessStartInfo(Server.MapPath(“~/ffmpeg.exe”));

info.Arguments = “-i \”” + strinp + “\” \”” + strop + “\””;

p = Process.Start(info);
catch (Exception ex)
//catch error here

Any Suggestions are welcome.

-By Siddharth Borania from Dhanashree Incorporation

SEO tips-website seo pagerank guide by borania siddharth

1. Url Rewriting :

As search engines are giving priority to url of a page when searched by keyword. So if your website have pages with descriptive URL, then it will be good for SEO.

2. H1, H2, H3 Tags in Site

Use of header tags will enable search engine to list your page for specific keyword or phrase.
And for better result, use only one H1 tag per page.

Use h1 tag for page heading, and h2, h3 for sub headings.

3. Specify Metadata
Use appropriate, and targeted keywords in Meta title, it will guide search engine, for which keywords your site should be listed.

Keep in mind that Meta description and Meta keywords are also important for making seo friendly website.

Rather than using same keyword always use synonyms in Meta title, and keywords.

4. Generate Sitemap File

XML sitemaps are key concept to instructing search engines the page structure of your website, and how often page content is updated, and when new content is added to the site.
To ensure auto discovery of your sitemap from all search engines, add this line to your website’s robots.txt file:
Sitemap: http://www.yoursite.com/sitemap.xml
Submit sitemap file in search engines as well for index your web sites pages.

5. Used Inbound links to website:

Inbound links are a great way to improve your page rank. Having some inbound links to your site will help a lot to improve page rank.
Inbound links from sites similar to your own are important as well.
If possible set inbound links from reputed sites (.edu and .gov domains are having high priority in search engine)

6. Submit your website in Business Directories:

As a Part of Web Promotion strategy, your website should be submitted in popular business directories like DMOZ, hotfrog, yellow pages.
Ensure that your submit website in relevant and targeted category, to quickly found by end user.

7. Add ‘Alt’ and ‘Title’ attribute to image and anchor tags respectively:

ALT and TITLE attributes boost both promotion efforts and your site’s accessibility, and they are a useful optimization tool because the Search Engine Spiders love the keywords.
The TITLE attribute displays on mouseover, while the ALT attribute displays for images if the images are turned off by visitor’s browser.
Adding this attribute will improve your website’s prof

Send email from asp.net 2.0

Hello guys here i have presented one of the way, to send email message from web application.

As, email notification has become essential functionality now a days in most of dynamic websites.

Below code i have represent in VB.Net language.

Hope it might be usefull


Dim Email As New System.Net.Mail.MailMessage(“fromaddress@test.com”, “toaddress@test.com”)

Email.Subject = “Test mail subject goes here.”
Email.Body = “You can place desired content here.”

Dim mailClient As New System.Net.Mail.SmtpClient()

‘This object stores the authentication values
Dim basicAuthenticationInfo As New System.Net.NetworkCredential(“validemail@gmail.com”, “validpassword”)

‘Put your own, or your ISPs, mail server name on this next line
mailClient.Host = “smtp.gmail.com”
mailClient.Port = 587
mailClient.EnableSsl = True
mailClient.UseDefaultCredentials = False
mailClient.Credentials = basicAuthenticationInfo