Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Can i create windows signup form in c# using HTML codes ?

c# html signup webform into c# html

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 emptiness

emptiness

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 29 January 2015 - 11:35 PM

Hi.
I am beginner in c# programming.
My language is C#

I have html source code of a signup form it have captcha security.

So my question is
Can i create windows signup executable application from
That html page ?

I tried many times but i dont know how to start.

Thank you.
Emptiness

#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 30 January 2015 - 08:56 PM

Welcome aboard,

 

You could translate it to C#, but why would you do that?

It's easier in C#, unless what you want to replicate is the captcha.

 

Tell us what exactly do you need and we'll point you in the right direction.



#3 emptiness

emptiness

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 31 January 2015 - 08:45 PM

Here is the code :

<!DOCTYPE html><!-- this MUST be first line -->
<html>
<head>

<title>Emptiness Account Maker</title>
</head>
<body>
<form action='http://register.xyz.com/register'method='post' id='cI' enctype='text/plain'>
<!-- hidden fields: -->
<input name='s' value="" type='hidden'/>
<input name='did' value='MIDP' type='hidden'/>
<input name='pid' value='mad' type='hidden'/>
<input name='cid' value='mad' type='hidden'/>
<input name='l' value='en' type='hidden'/>
<!-- visible fields: -->
<p>
<b>USERNAME</b><br>
<input name='un' value=''/>
</p><p>
<b>PASSWORD</b><br>
<input name='pw' value='password'/>
</p><p>
<img id="CAPTCHA" src="" /> <input type="button" id="regen" value="REFRESH" />
</p><p>
<b>CAPTCHA</b><br/>
<input name='c' >
<br/><br/>
<input name='send' value=' CREATE ' type='submit'>
</p>
</form>

<script type="text/javascript">
var dids = ["MIDP","ANDROID","WINDOWS","BlackBerry","SYMBIAN","MAC","WP","LINUX","IPHONE","WM"];
var curdid = 0;

function createCaptcha()
{
var chars ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"
+ "abcdefghiklmnopqrstuvwxyz";
var str = "";
for (var i=0; i<10; i++)
{
str += chars[ Math.floor( Math.random() * chars.length ) ];
}
var form = document.getElementById("cI");
form.s.value = str;
document.getElementById("CAPTCHA").src =
'http://register.xyz....&h=40&f=png&s='+ str;

form.did.value = dids[curdid];
curdid = ( curdid + 1 ) % dids.length;
}

// generate initial CAPTCHA strings:
createCaptcha( );

document.getElementById("regen").onclick = createCaptcha;
</script>
</body>
</html>


From using this code
I want to creat user signup application in c#


It must have
1 textbox for username
1 Textbox for password
1 Button for refresh captcha
1 Button for submit form
1 Textbox for captcha text

Please help me

I also want to select that
"MIDP","ANDROID","WINDOWS","BlackBerry","SYMBIAN","MAC","WP","LINUX","IPHONE","WM"

Values randomly at

<input name='did' value='MIDP' type='hidden'/>

Please help to solve this.

#4 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 01 February 2015 - 06:39 AM

Everything is easy except the Captcha, which you could bring to your app the same way the page does, but I doubt it's for free because register.xyz is likely to be paid captcha service. Can you confirm that?



#5 emptiness

emptiness

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 01 February 2015 - 07:58 PM


I gave you example of xyz.com.

Actuall
Domain is different

Can you tell me how to ? Do this now

I want to make signup application....

#6 PBJ

PBJ

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 176 posts

Posted 02 February 2015 - 04:10 PM

@emptiness

If your going to be making a full-blown web application I'd suggest using a JS framework or library better suited, such as AngularJS or jQuery. Pure JS in large applications can be hard to maintain and test. Here is a little tutorial, showing the power of AngularJS.

 

EDIT:

If you need a captcha, I don't see why you need to write a function for that, there's a module for that. 


Edited by PBJ, 02 February 2015 - 04:12 PM.





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download