TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Oladotun Obileye
NA
98
19.4k
Please how do I fix button click event using bootstrap theme
Apr 27 2019 6:20 PM
Good day everyone please i am having challenges to have a button click event in my asp.net project when ever i try to click on my bootstrap theme when designing button it does not take me to the asp.net webform eg(default.aspx.cs) instead it takes me to the default.aspx. so i am unable to write my code under the button without using the asp.net drag and drop button.
<
button
ID
=
"btnlogin"
class
=
"btn btn-primary btn-block btn-flat"
type
=
"submit"
runat
=
"server"
oneserverclick
=
"btnlogin_onClick"
>
Sign in
</
button
>
this code is not working. i want whereby whenever i click on the button it makes something like this
protected
void
btnlogin_Click(
object
sender, EventArgs e)
{
where i can write code like
this
protected
void
btnlogin_Click(
object
sender, EventArgs e)
{
SqlConnection con =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"loginConnectionString1"
].ToString());
con.Open();
string
query =
"select count (*) from log where username ='"
+ txtuser.Text +
"' and password ='"
+ txtpass.Text +
"' "
;
SqlCommand cmd =
new
SqlCommand(query, con);
string
output = cmd.ExecuteScalar().ToString();
for registration and other codes
Reply
Answers (
4
)
applying _Layout view to in mvc
problem positioning some div class??