Skip to main content

All Questions

Tagged with
1 vote
0 answers
36 views

Two table inserts retaining same ID for a ForeignKey using Webmatrix, Bootstrap, Html, and SQL

I am working in visual studio with a database that has many tables. I have a html bootstrap form which allows a user to input various fields and those fields must be inserted back into my database. ...
Nois3y's user avatar
  • 11
1 vote
1 answer
489 views

C# - Use WebImage.GetImageFromRequest() with multiple uploads

I am trying to upload multiple images from a form. And then grab the images using WebImage.GetImageFromRequest(). This works fine with a single upload field, but I'm not sure how to use this to get ...
E Benzle's user avatar
  • 346
1 vote
1 answer
33 views

How to get the values of radio buttons' values that where assigned with a variable to store in a data base using Razor

guys! First of all thanks in advance for the time you take to help me. I have this code: @{ int Contador = 1 ; var db = Database.Open("StarterSite"); var Clases = db.Query("SELECT TOP 5 ...
Rodrigo Fernando Luna's user avatar
0 votes
1 answer
70 views

Image Upload doesn't work in Server. Works fine in localhost

So, this code works just fine in localhost. It deletes the previous image and uploads the new one. It does nothing on server however. Any clue? I have used AJAX for asynchorous call By the way if ...
Npandit's user avatar
  • 61
2 votes
2 answers
11k views

Why do I get an SQL parsing error when I use parameters?

I'm working on a database application in Webmatrix. I have a cshtml file which is supposed to update a record in the database. Everything works correctly if I use string concatenation for the SQL ...
Lemniscate's user avatar
0 votes
1 answer
45 views

Webmatrix - displaying relevent data from joined SQL tables

I'm stuck doing a listing page on a new site. I have 2 tables in my database, Location and Location_Images, with a common field location_id in each. I'm wanting to create a list of locations where ...
Mark's user avatar
  • 321
2 votes
1 answer
472 views

Using wildcards when mapping routes with MapWebPageRoute

In an ASP.NET Web Pages project (not Web Forms, not MVC) I am using Mike Brind's More Flexible Routing For ASP.NET Web Pages. I want to create a route that picks ups any number of route elements but ...
johna's user avatar
  • 10.7k
1 vote
1 answer
384 views

Unable to pass 2 parameter in ASP.NET Razor - WebMatrix Database Query() method

I am unable to use WebMatrix database method Query() with 2 interpolate string. Actual Code: (Not working) @{ var db = Database.Open("WebPagesMovies") ; var selectCommand = "SELECT * FROM ...
Aravin's user avatar
  • 6,909
1 vote
1 answer
63 views

Internal search engine for webmatrix 3

I'm trying to implement an internal search engine for my webmatrix website, it will serach through my database(SQL CE) for similarity and return results. Someone suggested me to use lucene.net because ...
Softmochi's user avatar
  • 119
1 vote
1 answer
159 views

Razor WebPage: How to make data from the database alvailable to several pages?

My question is quite similar to this one. I get the same data (attributes of objects, each row represents an object) from the database for two of my pages, one page to edit the data and one page to ...
elementzero23's user avatar
0 votes
1 answer
262 views

WebSecurity.GetUserID(HttpContext.Current.User.Identity.Name) does not always return the UserID

I have a WebMatrix application and I am using WebSecurity.GetUserId(Http.Current.User.Identity.Name) to grab the UserID. Sometimes it returns the UserId and then other times it returns a -1. I have ...
tnlewis's user avatar
  • 323
3 votes
0 answers
530 views

XML sitemap remove xmlns from url tag

I am using the below lines to generate sitemap but google says there is an error. I know the error but i am unable to figure out how to remove the tag. THe code @using System.Xml.Linq; @{ Layout = ...
Gautam Sharma's user avatar
0 votes
2 answers
78 views

PageData fails to pass data in WebMatrix

I am building a website with WebMatrix. I would like users to enter their name in the main page and after redirection their name will be shown in the results of another form. But my code is not ...
user avatar
1 vote
2 answers
2k views

Form post but do not reload the page

I am stuck in this like I have never before. My situation : I am making a shopping cart. When user click "Add" button, it posts the form and in the server side i.e inside if(IsPost){....}, ...
Nick's user avatar
  • 23
0 votes
1 answer
82 views

Submit the form but don't reload the page. Webmatrix razor

I need to figure out a way to submit my form but do not reload the page so that my page doesn't scroll to top again. Is there a way? <form method="post" id="myForm"> <button type="submit">...
Nick's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
28