In the previous two articles (1, 2) we explained connecting to Microsoft Access database and writing to it, in C#.
Now we do that in ASP.Net.
For start create a new ASP.Net project. First of all we are creating two labels, two text boxes and one button with the following code (add it between the <div></div> tags)
So, lets define the event which is invoked by clicking on the button (add it above html tag)
<script><!--mce:0--></script>
When we run the script on ASP server we will get the following page

By clicking the button is invoked the button1_Click event and then the data written in the text boxes is recorded to database.








{ 7 comments… read them below or add one }
Your blog is fine for people, who writes their first programs, I think. But in this example You schould use String.Format, or even StringBuilder class, because hard coded strings is the worst thing in applications like above. Do not teach other to write code like that.
Anyway, keep up to good work.
Thanks for your suggestion. You’re right, the String.Format or StringBuilder class is good when working with strings.
But, because this blog is for beginners I want to explain that as simple as possible.
In the next posts I will explain the use of String and StringBuilder classes.
So, step by step.
i am looking for same basic programming tips in asp.net and i found your blog.
Thanks for the post
well i saw your Blog its good for first level guy who is new in the hevaen of Programming…..u gave grate subtitute to use the control…hope u will post more and more…..i appreciate.
Great Article! Thanks for sharing very useful database connection. It will help me a lot.
Awesome. just awesome…i haven’t any word to appreciate this post…..Really i am impressed from this post….the person who create this post he is a great human..thanks for shared this with us.i found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me.Really the blogging is spreading its wings rapidly…
Your blog is fine for people, who writes their first programs, I think. But in this example You schould use String.Format, or even StringBuilder class, because hard coded strings is the worst thing in applications like above. Do not teach other to write code like that.
Anyway, keep up to good work.