Asp.net & Sql server fundas with Rajat Jaiswal

March 21, 2009

WebSite available on search engine 2 simple technique

Filed under: Uncategorized — indiandotnet @ 6:12 am
Tags: , ,

Hello Friends,
Today I will give you hint how to make your website  search engine compatible.
Most of the time we have problem how we make our web site so efficient so that it will easily available in search engine like Google, yahoo and msn.
Here I am with two tips which help you in this basic so try it and enjoy it.
1) First thing is a use META tag in your web pages for example
<META NAME=”keywords” CONTENT=”Rajat Jaiswal, Asp.net & Sql server, web Developer, Indian dot net, Sql server fundas”>
<META NAME=”robots” CONTENT=”FOLLOW, INDEX”>
2) You have to follow below URLs and link up your web site over it. 
https://siteexplorer.search.yahoo.com/Submit
http://www.google.com/addurl/?continue=/addurl
http://search.msn.com/docs/submit.aspx

I hope the above 2 option will help you in your need.

So make your web site available on this search engines.

Enjoy programming :)
Thanks …

February 28, 2009

How to download Youtube video on your system ?

Filed under: Uncategorized — indiandotnet @ 6:47 pm

 Hello Friends,

www.ecubicle.net

Most of the time you are really in good mood to watch your faviourite videos on youtube but you face some kind of problem with the net connection. And then you think at that time if there is any utitlity by which I can keep my faviourite videos on my pc or laptop so next time my I don’t need to afraid with net connection and bandwidth.

So if you are asp.net programmer or even not then your wish can be full fill here I am with the example how to download a youtube video on system?

 So first thing is thanks to 

which provide a web service which return url of your video.For download you tube video on your system you have to do some simple steps

 www.ecubicle.net which is “http://www.ecubicle.net/youtubedownloader.asmx you make reference in your project you can easily use it. See below fig for it. AddWebRefrence“  As

 1) Add the webservice given by   

 http://www.youtube.com/watch?v=6×1ddBJ3kiY )

 2) Then just design your screen according to your requirement current I have taken three textbox one is for video URL like (

Which you want to download and second is the path on your hard disk where you want to store download file & third is filename by which name you want your file to store. And a button with name downloads.

Screen 

 

3) The web service which we added in reference doesn’t return file it just return the original file path.

4) Now when you press download button just write following code:-

 

Protected Sub btnDownLoad_Click(ByVal sender As Object, ByVal e As EventArgs) Handles

btnDownLoad.Click 

Try

  If Me.txtPath.Text.Trim <> String.Empty AndAlso Me.txtUrl.Text.Trim <> String.Empty Then

  Dim strDownLoadUrl As String

 Dim strUrl As New Uri(Me.txtUrl.Text.Trim) ‘ url Like http://www.youtube.com/watch?v=VkCFeNeqyHk&feature=related
 Dim mtube As New net.ecubicle.www.YouTubeDownloader ‘object of web services
strDownLoadUrl = mtube.GetDownloadURL(strUrl.OriginalString) ‘ returning as string

 Dim downloadClient As New WebClient ‘create object of web client

  downloadClient.DownloadFile(strDownLoadUrl,Me.txtPath.Text & “\” & Me.txtFileName.Text) ‘ download file

 downloadClient.Dispose()

End If 

 Catch ex As Exception 

 Throw ex 

End Try

 End Sub
There is only one drawback in current code it hangs your screen till download.

 No issue that one also either you can use ajax progress bar for it or thread code to make process in background.

So here is the solution with “Threading ” which will run in background.

 Protected  Sub btnDownLoad_Click(ByVal sender As Object, ByVal e As EventArgs) Handles  btnDownLoad.Click  

 

Try

  If Me.txtPath.Text.Trim <> String.Empty AndAlso Me.txtUrl.Text.Trim <> String.Empty  Then

  Dim strUrl As New Uri(Me .txtUrl.Text.Trim) 

 strDownLoadUrl = mtube.GetDownloadURL(strUrl.OriginalString)

Dim mtube As New  net.ecubicle.www.YouTubeDownloader

 strStoragePath = Me.txtPath.Text & “\” & Me .txtFileName.Text  mythread.Start()

Dim mythread As New Threading.Thread(AddressOf  pvt_DownLoad) ‘calling thread

 End If

 Catch ex As  Exception 

 Throw  ex  End  Try End  Sub

  Private Sub  pvt_DownLoad() 

 Try Dim downloadClient As New  WebClient()

downloadClient.DownloadFile(strDownLoadUrl, strStoragePath)

 downloadClient.Dispose() 

Catch ex As Exception 

 Throw  ex

End  Try 

End  Sub

 I think you got the idea how to work on it.

 Enjoy downloading youtube videos.Enjoy weekend

God bless

Thanks

Rajat Jaiswal

 

 

January 5, 2009

Happy New Year -2009

Filed under: Uncategorized — indiandotnet @ 10:43 am
Tags: , ,

Hello friends

Happy New Year 2009.

November 25, 2008

Asp.net with ajax performance

Filed under: Asp.net, ajax — indiandotnet @ 11:06 am
Tags:

Hello friends,

let start with some perfomance improvement tips which i used and it improved performance too.

but before starting it be sure that u have restored  Vs2008 sp1.

It will give many new functionality.

today’s tips is Load Script befor Ui property in scriptManager tag of ajax.

when you use the  LoadScriptsBeforeUI=”false”   then Script is load first then javascript dowloaded on client site due to which performance at user end is improved.

Secondly if you require partial page rendering that use it  EnablePartialRendering=”true”

just because of it your performance will improved.

you can use both the otption as shown below.

 

<asp:ScriptManager ID=”ScriptManager1″ runat=”server” AsyncPostBackTimeout=”3600″  EnablePartialRendering=”true” LoadScriptsBeforeUI=”false”>  

Thanks

Rajat

 

 

October 14, 2008

Security Information

Filed under: Asp.net, Uncategorized — indiandotnet @ 12:25 pm
Tags: , ,

Dear all,

Today i stucked in a new problem. i got  security information “This Page Contains both secure and nonsecure items, Do you want to display nonsecure items popup?”

after a lot of research i got the solution.

1. If you are using image from SSL site which is not your at your domain like if you use https://google.com/image.jpg like this then

explicitly use https or use  url =’//google.com/image.jpg’

2. if you are using same domain so just use url =’image.jpg’

it will solve the purpose.

thanks

i hope it will help some one..:)

September 16, 2008

First Day first blog

Filed under: Uncategorized — indiandotnet @ 7:51 am

Dear all,

from today  i am going to start bloging. i am mainly concentrate on asp.net & sqlserver. mean while other  technologies are also here in this blog. so give your full support thanks in advance.

Blog at WordPress.com.