I have a page called rateuser.aspx. Basically, this page allows one user (eg. me) to give a feedback on another user (eg: user b). These username should been retrieved when i logged in and when i go to user b's profile page. how do i retrieve these 2 different member id without clashing?Also, when i want to insert the feedback, how do i insert these 2 different id into the rateuser table w/o clashing because my member id is retrieved from the user table.
I have two member roles at my project: 1.) Administrator 2.) Member
From the toolbox in Visual Studio 2008, I have dragged and dropped the create user wizard into the stage. I aim that a guest can register itself and automatically join the "member" role. Not the role "administrator". How can I do that?
public class WebModel { public List<ArticleModel> Articles { get; set; } } public class ArticleModel { public int ID { get; set; } public double ValueParam { get; set; } }
Then I have the controller with the two actions:
[Authorize] public ActionResult Index() { WebModel model = new WebModel(); ModelConverter.ConvertToModel(model, controller); return View(model); } [Authorize] [HttpPost] [ValidateInput(false)] public ActionResult Index(WebModel model, string saveButton) { ModelValidation.ValidateWebModel(model, ModelState); if (ModelState.IsValid) { return RedirectToAction("Create", "Article"); } ModelConverter.ConvertToModel(model, controller); return View(model); }
If I press the submit button, I get to the second action method in the controller (the one with the HttpPost attribute). In this action, the object model itself is not null, but the "Articles" list inside is null.
Is there simply no way to grab multiple files and upload them at the same time via a webform? I have searched everywhere and I cannot find a single code example. The best that I can find is selecting one file at a time to a listbox for holding and then uploading. This is NOT going to work for me.
I've got a requirement to add a feature that will save off a dynamically created asp.net page so it can be recalled and reviewed at a later date. I was thinking of just adding a 'Save' button to the page and in the code-behind using VB to write the output HTML to a varchar(MAX) field in my database.Does anyone know how (in VB) to grab the entire page HTML so it can be inserted into a database?
I'm trying to create a member section for my website and a non member section. I want the nonmember pages to have access to all the member pages but just not certain features like saving to the database. Is there a way to have the same page for both members and non members but have certain controls like buttons and other things that are only usable to the member that is logged in?
I'm working on this big project in MVC ASP.NET w VB.NETOne of my views is getting me headaches since a few and i'm not sure what's up.I've used the Begin.Form and Html.Encode methods alot in my other views and i never had any problems. Now this new Create.aspx view for one of my object called Automation is giving me multiple build errors such as those cited in the title plus
Error 184 'Context' is not a member of 'ASP.views_automatisation_create_aspx'. BeginForm is not a member of 'Html' Encode is not a member of HTML
My header is as follow (just like all of my other working views headers) : \ <%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of XXXXX_XXXXX.Automatisation)" %>
Is there a way to grab the querystring from the original request or pull it from the ASPX ErrorPath?
We've updated 5 applications, and combined them into one. However, when someone requests and old URL such as [URL]I tried capturing the value from the querystring, but it does not seem to work since the aspxerrorpath is there (404 page).
I have a GridView with an ItemTemplate and an EditTemplate:
[code]....
I am able to go into Edit Mode and once in edit mode I can see the textBox tbLogEntry fine. lblLogEntry is gone. I have left regular Item mode and am in Edit mode:
[code]........
gives me back the original value, not the new one.
How do I get the edited value from the front end textbox?
I have the following jQuery code working as it is (passing the value of 'test") but what I want to do is to pass the value of the label control (lblNames). I'm using the label control to collect the uploaded file names.
for some reason when I alert this out I'm only getting the server-side Id, not the auto generated ASP.NET ID that would be created during runtime:
<form id="form1" runat="server"> p id="facebook-LoginButtonContainer"><asp:ImageButton id="btnFacebookLogin" runat="server" ImageUrl="images/facebookLoginBtn.jpg" /></p> </div> </form> <script type="text/javascript"> var loginButtonID = '<%=btnFacebookLogin.ClientID %>'; alert(loginButtonID);
NOTE: the code above is inside an .aspx page that's wrapped inside an IFrame. I know that's probably some of the issue here maybe? If not then what?? I don't have a master page included this time either because it doesn't make sense as this page serves as the content for this IFrame. So it's just just a plain old .aspx inside an IFrame with a form that has runat="server"
c# - How to Grab Date Only from a Variable of Type DateTime
DataTable tempTable = new DataTable; tempTable = getCustomerTable(); In this case, tempTable will have a table (named CustomerInvoice) which has 5 columns. The 3rd column is named DueDate. I print to a listview as following:
[Code]....
I prefer to solve this problem at application rather than db level. NOTE: DueDate in database is of type datetime. I'm coding in C# interacting with Sql-Server. I hope my question is clear enough.
i am trying to grab data from here : http://mediaforest.biz/mobile/nowplaying.aspx in the page you select a station and post it then you get new page with data. but i cant grab it, i get the same page again.
Referencing my Earlier Question, regarding downloading a file from a server and handling exceptions properly. I am positive that I had this solved, then in classic programming fashion, returned days later to frustratingly find it broken
Updated code:
private static void GoGetIt(HttpContext context) { var directoryInfoOfWhereTheDirectoryFullOfFilesShouldBe = new FileInfo(......); [code]....
This was working fine, and returning the zip, otherwise if the file didn't exist returning 404. Then on the client side I could handle this:
public bool Download() { try { using (var client = new WebClient()) [code]....
But the problem now is two things.
1) I get System.Threading.ThreadAbortException: Thread was being aborted in the server side try-catch block. Usually this was just a file not found exception. I have no idea what or why that new exception is throwing?
2) Now that a different exception is throwing on the server side instead of the file not found, it would seem I can't use this set up for the application, because back on client side, any exception is assumed to be filenotfound.]
Is it possible to grab the cell data from Repeater items property such asDim test As String = myRepeater.Items(index).DataItem(2)where myRepeater has x rows and 10 columns and was bound from the DataTableSeems like it should be trivial, but looks like individual cells CAN NOT be accessed
My stored procedure requires an input parameter -- @CompanyName -- and has one output parameter - @CompanyID. This is how I always handled stored procedures that did NOT use output parameters. How do I grab the value coming from the output parameter?