MVC 3.
I have a View that displays a collection of a Model using the Html.BeginColle ctionItem helper.
When the page is rendered the ids of the objects look something like this:
car[8abde400-b544-49df-b00e-e2462838ec96].id
...
car[3a58e517-fc4e-4b36-bf63-a7812f8b7cb5].id
I would like to get this for some specific validation purposes in the Controller when the data posted is received,...
User Profile
Collapse
-
vavc1980 started a topic How to get the HTML client id generated by MVC in the controller when posting?in .NETHow to get the HTML client id generated by MVC in the controller when posting?
-
Output parameter read from stored procedure empty
I'm using a stored procedure from an ASP page using a ADODB connection, the sproc returns a value and also has an output parameter.
Both are being read in the page but they are both empty, I profiled the sproc call and tested it directly and the values are being returned correctly.
What could the problem be? quick note: in another server the same code works fine.
The code I'm using to get the values looks like... -
Well, I kept trying and I was able to accomplish my goal, this is how I did it, maybe there is a better, cleaner way, but at least it works. If you have any better suggestions let me know.
text = Regex.Replace(t ext, @"([\s-.()])", string.Empty); -
Replace all special characters except asterisk
Hello,
I've been trying to find a way using regex to replace all special characters and spaces in a string but leaving the asterisk there.
Example:
(8.88)***1 234--
result should be:
888***1234
I've been looking on the web (still am) and also trying myself but I just can't find it, what I have removes the asterisk too, which I don't want. Here's what i have (by the way this is... -
Thanks Plater and tlhintoq for your suggestions.
I did what you guys suggested, in my installer project I went to the Registry section (right click on the project -> View -> Registry) and added my key in HKEY_CURRENT_US ER\SOFTWARE\MyC ompanyName\MyPr ogramName.
Obviously I updated my code to read/write the value needed at that key. I seems like it works now without having to set the permission to Local_Service.
...Leave a comment:
-
Sorry I was not clear before.
When I install the service, it creates that path in the registry (with the description, displayname, errorcontrol, and other keys) in the location I told you before.
Of course in my code I'm using that path to create/read a key that I use for other purposes.
My original problem is that everytime I install the service that registry path does not have permissions for LocalService, thus my...Leave a comment:
-
It is in HKEY_LOCAL_MACH INE\SYSTEM\...
Thanks for the info. I did not know about the standard.
I did not specify that anywhere, that is where the installer created it.
Where can I specify that?
how about my original question about setting the permissions for the LocalService user when installing? do you have a suggestion?
Thanks.Leave a comment:
-
Installer. Set registry key permissions
I coded a windows service in Visual Studio 2005, I have the installer with it.
The registry keys for the service are created in System\controls et001\MyService .
The service is installed with LocalService account.
Problem is, after installing it, my service tries to add a key into that registry key location (intentionally added in the code), and it always fails because it does not have permissions, so I have to manually... -
C#-APP: Not able to get values of controls in TabPage
Hello,
I'm working on a windows application with C#, I reorganized a screen using the TabControl with 3 TabPages.
Here's my problem, when I want to do something (printing, reading, etc) with a control in any TabPage that has not been opened (clicked on), I got nothing, the controls at this point have not been created, not until I click (manually or programatically ) on the TabPage. Right now I have it working going... -
Validate Date range
Hello,
I have a couple of textboxes where I enter a date range (From - To), I need to validate that the Date From is greater (future) or at least equal to the Date From, or else give an error.
I almost made it work, when I use the same format in the year (2 digits, or 4 digits) in both dates, but when one of them has a 2 digit year and the other 4 digit year, it does not work??
Is there a simple way to do this?... -
I tried to do that before but it wasn't working out until I added the 'Function()' word like I posted before and then between the {} the name of my function.
Thanks for replying Plater....Leave a comment:
-
Insert a row into a table with 2 foreign keys
Ok, here's my problem, I'll try to explain it the best I can, it may be something really simple.
I'm working in a .NET web page to add new users into the table in SQL.
I have the main table that will be updated with the new information, this table has 2 foreign keys (ids), each one of them to different tables.
Problem comes when a new user is been added, the web page displays the descriptions for these 2 fields, but in the main... -
I got it!!
I wasn't using the "function" word before the name of the function I wanted to attach to the onclick event..
getelementbyid( "item").onc lick = function(){function_name( );};
thanks for the reply anyway.Leave a comment:
-
Add and event to a asp:button
hello!
I have a form in a aspx file, in which I have a button (asp:button), I want to add/attach an event (onclick, or onsubmit) using javascript, I know I just can type the syntax right there, but I was requested to do it through javascript document.getele mentbyid.
Is that possible? if so, how?
Thanks -
-
Nico5038,
Thanks for the reponse.
I read the link you posted, try it, and it works fine, but not completely...
I successfully hide all the toolbars and menus, and display only my custom toolbar, however, when I right click on the menu bar most of the options in the popup menu of the right click are gone, except for the 'Customize' one, which it's a big flaw in this because from there we can add or remove any option we...Leave a comment:
-
Custom MenuBar
Hello,
I have a database with forms,reports, etc. and I want to create a custom menu bar with only the options needed for the user. I know how to create it, my problem is, after hiding all other toolbars or menu with only my custom menu displaying it is possible to right click on the menu and select any other menu or even the customize option...
Is there any way to disable the use of functionality of the right click... -
Well, I think I'm half way to what I want.
I changed the form property BorderStyle to 'none', and Auto Center to 'yes'
Now I need to figure it out how to change the background color of access to match the color I have in my form to make it look like one.Leave a comment:
-
-
Form as a background on application
Hi,
I hope I can explain what I'm trying to do. I have a main form (menu) that I would like to have as if it was a "background " type of thing in the access application, I know I can use Docmd.Maximize, but the controls in the form align to the top left corner, and I would like to see them at the center of the screen...
Is there any way to do that, besides obviously creating a huge form that covers the whole scr...
No activity results to display
Show More
Leave a comment: