Quantcast
Channel: WebMatrix and ASP.NET Web Pages
Browsing all 20 articles
Browse latest View live

Re: How to get data from SQL Database for specific logged in users

<form method="post"> if (Condtions == Conditions) {<input type="checkbox" name="hobbies" value="@row.Value" checked="checked" />@row.Value<br> } else {<input type="checkbox"...

View Article



Re: How to get data from SQL Database for specific logged in users

Afzaal, Can you please explain with an example, I would request you to explain using my code above.How would I implement the foreach code in my code ?

View Article

Re: How to get data from SQL Database for specific logged in users

What this one ? Its simple.The foreach will loop through the results. And the row is used to set the values and the values are from resultOfYourQueryThan in the form there is a form. In it you have if...

View Article

Re: How to get data from SQL Database for specific logged in users

Afzaal.Ahmad.Zeeshanforeach (var row in resultOfYourQuery) {<form method="post"> if(valueFromDatabase == ConditionApplied) {<input type="checkbox" value="boy" checked="checked" /> } else...

View Article

Re: How to get data from SQL Database for specific logged in users

You can use the values from database. Such that the names If you have a name of user or anything you can add that to the page using razor code as @row.Name<textarea name="area-to-write" rows="2"...

View Article


Re: How to get data from SQL Database for specific logged in users

Thankyou all for your valuable inputs.After getting different hints from all of the above post, I finally managed to create the page I wanted to.Below is my code, which is working, fine, request you...

View Article

Re: How to get data from SQL Database for specific logged in users

This is the code for currentLoggedIn userWebSecurity.CurrentUserIdYou can use it in every field of SQL. If you want to get a result from SQL you can try out this word as the WHERE to get the values for...

View Article

Re: How to get data from SQL Database for specific logged in users

Aafi I have replaced the database name and table name, but still getting this error.You have to replace the row.Name and other table columns with your own table columns.

View Article


Re: How to get data from SQL Database for specific logged in users

I will look at it this weekend, I cant for now need to head home.Do some more research into the way to check current user, so for now just google How do I know which user just logged in c#and see if...

View Article


Re: How to get data from SQL Database for specific logged in users

Hey Angelo, Below is the link of a zip folder for my test website, all webpages and databases are in there.. https://docs.google.com/open?id=0B0EOR1V1lsEONERtMklnQ3ZqTmsHope this helps

View Article

Re: How to get data from SQL Database for specific logged in users

Hey Angelo, The update command will update the database, but how will it know that it needs to update the information of that particular user who is logged in ?

View Article

Re: How to get data from SQL Database for specific logged in users

Hello Aafi ,You can use the same page basically, just change the SQL command from INSERT to UPDATE,I could post the code here, just do a quick search on the web or maybe look at this...

View Article

Re: How to get data from SQL Database for specific logged in users

aabruzzeseIf you need help, maybe just post the structure of your user profile table and I could help you create a basicpage to display and update the info.Ok,Starting with the HTML, below is the code...

View Article


Re: How to get data from SQL Database for specific logged in users

Hi,You have to decided which approach you will use to update the data, so basically some kind of link to open the profile update page and then do the actual work.Here is a project that is simple enough...

View Article

Re: How to get data from SQL Database for specific logged in users

fimineRead this: http://forums.asp.net/t/1239043.aspx/1Thank you for the link, but I am unable to understand anything on that link.I am very new to programming and have just started learning ASP.Net...

View Article


Re: How to get data from SQL Database for specific logged in users

Read this: http://forums.asp.net/t/1239043.aspx/1

View Article

Re: How to get data from SQL Database for specific logged in users

Thank you for the reply, But I am getting below error when I try running the code.I have replaced the database name and table name, but still getting this error.Cannot perform runtime binding on a null...

View Article


Re: How to get data from SQL Database for specific logged in users

I'll give you the following code to see how this is done:@{ var db = Database.Open("website"); var selectQueryString = "SELECT * FROM webpages_UserProfile WHERE UserId = @0"; var row =...

View Article

How to get data from SQL Database for specific logged in users

Hello All, Need help.I created a simple user form, wherein users can enter their First Name, Last name, DOB, Location, etc..I am able to Insert users input data from the HTML form to the SQL CE...

View Article

Re: How to get data from SQL Database for specific logged in users

Hey Afzaal,I tried the above code but it gives a compilation error (Compiler Error Message: CS1061: 'char' does not contain a definition for 'drawing' and no extension method 'drawing' accepting a...

View Article
Browsing all 20 articles
Browse latest View live




Latest Images