I'm working on a mapping application and will be allowing a user to make a query and have the resulting locations display on a map.I want the users to be able to interact with the map, but I need to know exactly which item they're interacting with, so it would be easiest if when the original query is made, the id's are put in a hidden field somewhere so I can just perform an insert statement based just on the key, rather than having to to another query to find out the key by saying "where location name is x and the coordinates are y, and the description is z" etc.Is this a bad idea, i.e. could anyone do any harm if they discovered that I was storing the primary key in a hidden field?
My current project has many peripheral systems and many different environments (testing, integration, development etc). As expected, we're using .config files to dynamically manage everything.
Instead of updating each relavant key when deploying to an environment, I was hoping there was a way to change 1 key only. Such as:
I've done some searching and haven't come up with an elegant solution. I'm aware that .config files can make use of system variables, but this seems like a bit of a high wire act.
Javascript automatically move cursor to next Input Control(Like Textbox ,Dropdown,checkbox,radioButton these Controls are usen in Gridview) in gridview using up/down Key.
Is aspnet_regiis.exe secure? If i encrypt using aspnet_regiis.exe, will it automatically decrypt the string and wont give any error? Need an insight into this stuff.... Is Rsa the best option or wat? Wat's the best way to encrypt/decrypt programmatically?
I can tried save some data to ViewState, but i get this Error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'HeRMeSSAAS.BussinesProcess.BussinesServices.CandidateService' of type 'HeRMeSSAAS.BussinesProcess.BussinesServices.CandidateService.' Code:
private IActionService ActionService { get [code]... How i can store value to ViewState?
So I have a dropdown setup on the page called ddlVehicleType that is populated from a store. This method gets called when another dropdown is changed, and it's supposed to remove all items from the aforementioned store, re-add them as needed, and then populate the dropdown with the new values. It's doing everything it's supposed to EXCEPT clearing the store before it re-adds the values, so the result is, when I switch, I'm getting what it used to be PLUS the new values that should be in there by themselves. Here is the weird thing though, when I switch back, the values are removed without re-adding anything. Can anyone tell me what I'm doing wrong? Method is below:
function filterVehicleTypes() { var masterStore = Global.getComponent("vehicleTypeStore").getStore(); var Source = Global.getComponent("ddlValuationSource").getRawValue(); var isIncuded = ''; var IncludeFlags = ''; if (Source == undefined || Source == null) Source = ''; Global.getComponent("ddlVehicleType").getStore().removeAll(false); masterStore.each(function(rec) { switch (Source.toUpperCase()) { case 'KBB': if (rec.get('Code') == 'KBB') { Global.getComponent("ddlVehicleType").store.add(rec); } case 'NADA': IncludeFlags = rec.get('MiscCode1'); if (IncludeFlags != null) { isIncuded = IncludeFlags.substr(1, 1); if (isIncuded == 'Y' && rec.get('Code') == 'NADA') { Global.getComponent("ddlVehicleType").store.add(rec); } } break; default: IncludeFlags = rec.get('MiscCode1'); if (IncludeFlags != null) { isIncuded = IncludeFlags.substr(0, 1); if (isIncuded == 'Y') { Global.getComponent("ddlVehicleType").store.add(rec); } } break; } }); }
For my Web Site I need store these codes belove, maybe others in future:
Google Analytic Code Some JavaScript codes HTML Footer and Header for my template.
I need a solution which could be centralized, use CACHE, easy to update:
01 Use a DATABASE with a Table (configure table) which for every records (VARCHAR) would allow storing of these spinets of code as string.
02 Use simple Text Files in a specific folder, so I can include these files in my code. I could update codes using FTP and NotePad (Here I am concern about cache).
03 Use Web.Conf file.
04 Use Text File and a Class wich would manage storing in cache the content of these file.
Where is the best place to store a javascript file in my website?
Should they be stored in the App_Code folder allong with C# files or should I create a dedicated folder in the root of the website? Or are there any other options?
I'm auto-generating a form in my ASP.NET page. This is already tested and working. I want to know if:If there are any security problems with storing the database ID as part of my controls ID? I can see think of 2 issues: the id will be visible in page source (not really important in this case), and the possibility someone could change the name of the control somehow? This second possibility is more serious. Is this a potential problem and how to void it?If there would be a better preferred way to associate a unique data with any type of control? Is it possible to store a custom item in the viewstate for the control?
I am developing a asp.net application to use the HMAC encryption (SHA1). I do not want to store the encryption keys in .config files or in database. In .net is there any other alternatives to securely store the encrption keys
I have been diligently learning all about the asp.net membership framework and have a test site running it all. However, during my testing, it became apparent that deleting users would be useful. I can delete users from the "aspnet_users" & "aspnet_Membership" tables simply by right-clicking on the table in server explorer, selecting "show table data", highlight the rows and press delete!!
However, this is a pain and I would much rather do this properly from code behind.
I have found out that the membership schema supplies a large number of "stored procedures" including "Delete_Users" however, when I execute this one manually, I have no idea what the last two parameters are (number of tables and something else from memory - the first two "application name" and "username" are easy to copy in to the dialog.
show me a sample set of VB code that I can use behind a "Delete User" button on my webform including how I supply the parameters. I have set up a drop down list box from teh "aspnet_users" table which displays the "UserName" and has as the SelectedValue "UserId".
Dragged and dropped a login control onto a blank content page. Set up my web.config (i'll include the code for that at the end). It seems to want to use a sql database to store the info. I just want to use the web.config since it's just a single user and a simple site. I thought I could just drag and drop the login control to a page and that would be the end of it (besides setting up the web.config).
we use forms authentication for a community website with about 200k users with a simple login like this:
Private Sub btnLogIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogIn.Click If CheckPassword(txtEmail.Text, txtPassword.Text) FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, chkRememberMe.Checked) End If End Sub
which checkPassword reads from a MS SQL users table. it has worked without major problems for 3 years but we need to store the login date of users in a table, both when they login explicitly and when they had selected "remember me" and come back (we store login once per session)
since we have a complicated profile system and database it will be practically impossible to switch to membership API. last time I was told we could user an auditing system to do that but I have no idea how to do that.
this is the ecenario, we're developing a web application in vb.net using vwd 05, and everthing has been great so far, we've recevied a lot ideas from the guys on this great forum. now we're facing a problem relating with usernames and userids.Our web application has 5 different roles, and theres a funtionality needed on a dropdownlist related to the user roles.
we're trying to store users full name and other data, i've seen the tutorials about storing addtional information and everthing is very clear there, the problem now is this code we have already to fill a dropdownlist.
Dim techUsers As String() = Roles.GetUsersInRole("tech") For Each usr As String In techUsers DropDownList1.Items.Add(usr) Next
So basically were looking at storing the user id of the user just created with the create new user wizard to our table where full name is gonna be stored.
table is like this:
userid
full name
and other data required here. etc
so basically, we're filling the dropdownlist with the usernames of the users in the tech rol with the coded i posted above, but we need to instead of showing the username(which is our case is just number) ,show the full name of that users belonging to the tech role, obviouly its just a query, but how to get the full names of users beloning to a specified role? thats the main question and problem we have right now.
I am writing a simple plugin for IE. I need to store a password and username setting for the user who uses the plugin. I know that I can store the username/password in the registry, I can manually encrypt it using the encription classes with .NET, or I can store it in a config file and encrypt the config file. I was wondering if there is a specific pattern/mechanism that I should use to store password and username.
Does anyone know a good tutorial for building a custom login control I've tried looking for one that suits my needs with no success. I want to be able to store credentials and other information in an XML file