Submit Your Question
         





Simple ASP.NET CAPTCHA Tutorial in Asp.Net

I will show you today how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages.

All you need to do is Create a ASPX page, that ASPX page will have a content type of image/jpeg, then within the code-behind file of that asp page we will be using system.drawing namespace to create a dynamic image.

System will generate 2 Random numbers, and then it will store the result of these 2 numbers into a Session Variable.

For Example

a = 2 + 3 (where 2 and 3 are 2 random numbers)

Session("Answer") = 5

then we will create a image using System.drawing namespace with the text " 2+ 5 = " within it.
We will store the result into a session variable, so later on our webpage we can use this session variable to compare with what user types.

Lets see the code of Captcha.aspx:

Imports System.Drawing

Partial Class Captcha
    Inherits System.Web.UI.Page

 

    Private Sub returnNumer()

        Dim num1 As New Random
        Dim num2 As New Random

        Dim numQ1 As Integer
        Dim numQ2 As Integer
        Dim QString As String


        numQ1 = num1.Next(10, 15)
        numQ2 = num1.Next(17, 31)

 

        QString = numQ1.ToString + " + " + numQ2.ToString + " = "
        Session("answer") = numQ1 + numQ2


        Dim bitmap As New Bitmap(85, 35)
        Dim Grfx As Graphics = Graphics.FromImage(bitmap)
        Dim font As New Font("Arial", 18, FontStyle.Bold, GraphicsUnit.Pixel)
        Dim Rect As New Rectangle(0, 0, 100, 50)

        Grfx.FillRectangle(Brushes.Brown, Rect)
        Grfx.DrawRectangle(Pens.PeachPuff, Rect) ' Border
        Grfx.DrawString(QString, font, Brushes.Azure, 0, 0)

 


        Response.ContentType = "Image/jpeg"
        bitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)


        bitmap.Dispose()
        Grfx.Dispose()

 

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


        Call Me.returnNumer()

    End Sub


End Class

 

So the Page_Load event Generates an Image.

 

now we can use this Page within any aspx page for verification. For Example here is form2.aspx

now you can create a TextBox, have users enter some text into it, and then create a ANSWER button, upon clicking of ANSWER button compare the value of textbox with the Session variable Session("answer"), if both are same then Verification passed.

if you have any questions, please reply to this post.

Thanks for reading

 - Saqib

 

Continue Reading & Comment >>>


Simple Backup Scheduler in Software

Do you want to backup your files to your Network Computer or to an external hard drive or an FTP location? Then "Simple Backup Creator" is a perfect solution for you. Best thing is its Totally FREE.

How to Use it

Create a new Backup.

Add Source Folders (on your PC)

Specifiy Destination (\\share or USB/External HDD or Ftp Location)

Specifiy how often you want to schedule

Specifiy how many Copies of your previous backups you want to keep

Install it as Service (if you want automated backups)

Thats it! You are done.

------------------------------------------------

I use it to backup my websites & databases to my FTP location, my schedules run every week and I dont need to worry about server crash.

Its available in 32bit & 64 bit version.

Download Links:

Download 32bit version of Simple Backup Creator

Download 64bit version of Simple Backup Creator

Please post all of your questions regarding usage or bugs below.

Thanks

Continue Reading & Comment >>>


Website to watch Pakistani Dramas in Desi Websites
Here is a nice website, where you can watch Desi Drama's online.

http://www.dramasonline.com/

Do you know any website? please share.



Thanks, and please share below.

Continue Reading & Comment >>>


shava tv channels in Shava Tv

I took few screens of Shava tv today (october, 2012). You can see how the Menu on Shava Tv looks like and few provided channels.


please note, I could not capture all the shava channels after the scrollbar, there is a sports category too for Cricket fans, if you want this box to watch any other sports besides cricket, then please dont buy. there is arabic & bengali category as well.

if you need to see more screens then let me know.

Thanks

Continue Reading & Comment >>>


shava tv vs jadoo tv vs jalva tv in Shava Tv

I could not find any valuable and fair information about these desi IPTV  boxes on internet. i am a owner of JAdoo Tv and Shava Tv...and i also know people who use Jalva Tv....i hope my article will help you buy the one that you need most.

Jadoo Tv (1 or 2)
------------------------------
its for those who dont care about LIVE tv and like on-demand stuff only...jadoo tv has alot of on-demand dramas and movies. oh and cricket is also available, but no LIVE good channels.

Shava Tv
--------------------------------
Built specialy for Desi pakistani community...it has alot of Desi Pakistani channels and few indians also. on-demand content for shava tv is very poor and cant even come close to jadoo. one more nice feature Shava has is...you can record programs (you have to buy Hard Drive)

Jalva Tv
---------------------------------
it is almost same as Shava, however does not have recording feature...rumors had it that jalva is about to change its name to BTV...which means something fishy is going on and i dont know for how long this box will stay in business.

on-demand suff includes movies, dramas,songs etc...and if this is what you need then get Jadoo...however jadoo is not posting content like it used to..could take days for new songs/movies to get updated. shava is for paki Live channels only..jalva I dont know for how long it can stay in market.

if you want to buy them then try not to buy online...online prices are pretty expensive...if you want to buy it then i would recommend you to buy from local stores...ask me if you need help.

Shava & Jadoo around $250,  BTV is Around $280..and jalva is around $350.

Did anyone tried any other box? or does anyone have their own opinion? then please share below.

At the end of the day...al these boxes are NOT really legal or official devices...so buy it at your own risk.

If you need to see the Screenshots of Jadoo Tv then visit Jadoo Tv Channels Blog.
If you need to see the Screenshots of Shava Tv Then visit Shava Tv Blog.

Enjoy the free stream of Dawn News Channel

Do you want to watch Desi Tv for Free on TV/iPhone/iPad? Then read this blog about watching desi channels on tv

Buy Cheap HDMI Cables for your Tv | Buy Universal Remote Control for Jadoo/Shava Tv

 

Continue Reading & Comment >>>