How to code an "create new employees" button - button

I'm building a web application as an apprentice developer, and I'm stuck completely on how to have this "add information" button? Would it need to be in a <table>?

Hmmm that's quite a vague question but I will try and help and give you a direction to Google things.
You might want to add a input button to your html for the user to click on. When the user clicks on the button you call a technology called JQuery which can then pass information from the client to the server via a technology called AJAX. AJAX can pass information from text fields of your new employees to the server.
Now in the code behind you can then call stored procedures and edit your database.
If you google the bolded text you should get a bit further with your endeavor.
Good Luck!
P.s I am from a C# ASP.net back ground.

Related

Hyperlink and Dynamic Search

I have an interesting task that I'm not sure if possible. I've built an extensive web application via asp.net. Here is the task I want to attempt...
User receives an email from the system. Inside of the email is their submitted ticket information along with a hyperlink. That hyperlink will currently take them to the search page of my web application. What I'd like to do is have the hyperlink take them straight to their ticket without them having to search for it. So click link, takes them to search page, they click a radio button to search for ticket number and then submit. I'd rather they didn't have to do that but have it take them straight to their ticket. Is there a way to do this? I've searched for several days and can't seem to find what I'm looking for or maybe I'm seeing it but just don't understand it.

How do I Create an Entire Web Form along-with its respected Code-Behind(.cs) file in Asp.Net on click of a button?

I Want to create an entire Web-Form on click of a button along with its Code-behind(.cs) file . I can work fairly with Asp.Net but i love to explore new things.just a question that popped up in my mind while working on something new ! So please if anyone of the great minds out there can help please help me out. Thank You.
Instructions for Visual Studio 2013
Open your web solution
In Solution Explorer, right click the web project
Choose "Add Web Form"
Enter a name for the form
Click OK
See also this link
Just extend Web Form class, define properties and methods which will render and show your web form. Handle button click event, initiated web form. Finally display it.
If its normal form you can simply render it using jQuery/JavaScript.
Hope this helps you buddy. :)

Have text file; need to search and extract to website

I have programming knowledge in Java, C++, C, C# and basic HTML. I just need some general direction of where to start with this task.
Do I need a database, like how would one go about doing this?
Books, subjects, keywords to look up, any help would be appreciated.
Basically I want user to click a button on website and have text from file go onto the site.
How hard is this task?
The simplest prototype of this I can think of is to use an HTML form and a PHP backend. On button click, submit the form and have the PHP process it on the backend. That can happen at http://yoursite.com/foo.php.
The backend then reads the content, sanitizes it, saves it to flat file or a database, and then sends out an "ok" type web page to the user.
Then, in another location on your site, say http://yoursite.com/bar.php, you simply read from that flat file or database, to display what the user put in.
Sure they could be the same page but then the code is more complex.
Simplistic, and not without security considerations, but hopefully it's enough to get you started down the right path.
I would not use C/C++ for this task, and Java or C# would be okay, but involve more effort than what I mention above.
C#, ASP.NET
create an asp.net web page
put button on it
put label and give it ID lblText
On button click read file like this:
var file = "full_path_to_a_file"; //like "C:\\textfile.txt"
var text = File.ReadAllText(file);
then attach text to your label
lblText.Text = text;
or whatever you want to do

Tampering With Control Text in ASP.NET

I was recently discussing this with someone, and I wasn't sure if this is an issue or not.
We are creating an ASP.NET website and if the user performs an action on a page we might create a database query using the Text values on controls that we have previously populated.
Could a user do something malicious like modify the text of a label control in their browser, then hit the update button and when we pull that label's .Text we end up inserting that value into the database?
It's easily done via firebug, for example, yes. Make sure you sanitize/validate any input coming in to prevent SQL injection or any other malicious intent.
Have a read of this MSDN article for more help.

how to create a pop up window #2

is there a way to create a pop-up window in a VB.Net application, specifically when a button has been clicked?
I'm designing a little help section on a web application I'm working on, and I wanted to have a variety of written steps followed by some sort of "Click here for an example" button that brings up a new window (not a new page, just a new window). The window would simply contain an image control displaying a picture that describes the written steps.
The best example I can come up with is here on Amazon when ordering a clothing item such as a pair of shoes. When the user clicks the "Sizing Info" link button, a pop-up window appears with information to help you order the correct size.
So is there a way to create a pop up like that in VB.Net?
In vb.net not, websites are handled differently. For displaying a popup using asp.net you need a client-side language, like javascript.
For instance this nice jquery script http://jqueryui.com/dialog/
Your vb.net can't open dialogs on client-side. If you need to get/send some information from the server, simply use webservices to send/fetch the information using ajax.

Resources