Default Page With Different Paramater Based On Their Location?
Jan 13, 2011
I have a list of paramaters eg A,P,C,K,L each paramater represent a value in the database when past in via request.querystring it returns the value from the database. the problem i am having lets say we http://localhost/default.aspx?string=P when you look at the view source of the page its changing the parameter "P" to another parameter from the list. i have approxmately 6000 clients connecting to this default page with different paramater based on their location.
View 1 Replies
Similar Messages:
Jul 10, 2010
just installed VS2010 from MS site.it comes with some of the membership stuff like login/register etchowever, i want to know where the database is. here is what the webconfig shows:
connectionString="data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
View 3 Replies
Sep 21, 2010
Where do I find the machineKey config section for ASP.NET?
I don't have one in my application Web.config, there isn't one in the root Web.config and there isn't one in my machine.config.
Does this mean there is some other default hardcoded into ASP.NET? If so, what are the defaults? (For .NET 2 and 4)
Having read this: [URL]
i was expecting to find something like this, somewhere:
<machineKey
validationKey="AutoGenerate,IsolateApps"
decryptionKey="AutoGenerate,IsolateApps"
/>
Edit: the 1.1 docs seem fairly clear wrt default values: [URL] but the 4 docs are rather ambiguous [URL]
View 1 Replies
Feb 23, 2010
I've got 3 connection strings in my app:
<add name="DBConnectionString" connectionString=""/>
<add name="ADConnectionString" connectionString="" />
<add name="TestDBConnectionString" connectionString="" />
now in the code i do:
[code]...
I get: The ConnectionString property has not been initialized. What am I doing wrong? AFAIK this should get the value I want...
I don't want to do in connections section as I WANT TO BE SURE that I don't mess up the production server since I'm in the same network...
View 1 Replies
Aug 5, 2010
Can i retrict the windows dialog to select only files from the selected folder and avoid to navigate from another folders?i am selecting from server side.
View 5 Replies
Mar 28, 2011
I am trying to get a parameter for my update from the gridview but it is an ID column that I do not want displayed. If I display the data in a boundfield it works fine but if I set the visibility to false the parameter is no longer sent to the update stored procedure. There does not appear to be a hiddenfield column that I can put into the gridview.I have tried to set the parameters through the code behind but I am not certain on how to access the data I want the following code does not work (It sets the parameter to nothing
Protected Sub grvFacilityDisciplineBillingRate_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles grvFacilityDisciplineBillingRate.RowUpdating
Dim row As GridViewRow = grvFacilityDisciplineBillingRate.Rows(e.RowIndex)[code]...
And this is the front end with the two ID columns displayed, which is not what I want
<asp:SqlDataSource ID="sqlDisciplineBillingRate" runat="server" DataSourceMode="DataSet" SelectCommandType="StoredProcedure" SelectCommand="SP_Facility_DisciplineBillingRates" UpdateCommandType="StoredProcedure" UpdateCommand="SP_DiscplineBillingRate_Update" ConnectionString="<%$ ConnectionStrings:Trustaff_ESig2 %>">[code]....
View 2 Replies
Sep 10, 2010
i want to pass multidementional array as parameter, below the code i worked, is it right
class ASRateContract
{
public string[,] standardrate = new string[3,2];
public string[,] storagerate = new string[3,3];
public void setstandardrate( string [3,2]name )
{
standardrate = name;
}
public string setstoragerate()
{
return "";
}
public string getstandardrate()
{
return standardrate;
}
View 6 Replies
May 19, 2010
I am trying to implement admin login and operators(india,australia,america) login, now operator id starts with 'IND123' 'AUS123' and 'AM123'
when operator india logs in he can see the details of only members have id 'IND%', the same applies for an australian and american users
and when admin logs in he can see details of members with id 'IND%' or 'AUS%' or 'AM%'
i have a table which defines the role i.e admin or operator and their prefix(IND,AUS respectively)
In loginpage i created a session for Role and prefix
PREFIX = myReader["Prefix"].ToString();
Session["LoginRole"] = myReader["Role"].ToString();
Session["LoginPrefix"] = String.Concat(PREFIX + "%"); works fine
In main page(after login) i have to count the number of member so i wrote
string prefix = Session["LoginPrefix"].ToString();
string role = Session["LoginRole"].ToString();
if (role.Equals("ADMIN"))
StrMemberId = "select count(*) from MemberList";
else
StrMemberId = "select count(*) from MemberList where MemberID like '"+prefix+"'";
Problem: 1. i want to constructor parameter something like
StrMemberId = "select count(*) from MemberList where MemberID like '@prefix+'";
myCommd.Parameters.AddWithValue("@prefix", prefix);
Which is not working
2 Displaying the members in gridview i need to give condition (something like if (role.Equals("ADMIN")) show all members else show member depending on the operator prefix)the list of members in operator mode and admin mode. - where to put the condition in gridview how to apply these
View 2 Replies
Feb 11, 2011
I'm trying to implement the following adjustments to the default ASP.NET RoleProvider so that it supports hierarchical role definitions. However i cannot create the following function, it keeps Executing the function.
Ref: [URL]
What is wrong with this function?
-- Template generated from Template Explorer using:
-- Create Multi-Statement Function (New Menu).SQL
--
-- Use the Specify Values for Template Parameters
-- command (Ctrl-Shift-M) to fill in the parameter
-- values below.
--
-- This block of comments will not be included in
-- the definition of the function.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
CREATE FUNCTION [dbo].[aspnet_Roles_Ancestor_TVF] (
@RoleId uniqueidentifier
)
RETURNS
@aspnet_Roles TABLE (
ApplicationId uniqueidentifier
, RoleId uniqueidentifier
, RoleName nvarchar(256)
, LoweredRoleName nvarchar(256)
, Description nvarchar(256)
, ParentRoleId uniqueidentifier
)
AS
BEGIN
; WITH aspnet_Roles_CTE (
ApplicationId
, RoleId
, RoleName
, LoweredRoleName
, Description
, ParentRoleId
, HierarchyLevel
) AS (
[Code.....]
View 2 Replies
Mar 9, 2011
I have several pages linked together that I want to maintain drop down selections for. I've seen a number of ways to do this with session values, etc, but I want to set the default value while still having the option of selecting other values.
Effectively, users will make selections on page 1 and then on page 2 they will use those same selections, but also potentially want to change their selections. My thought was that I could load the selections into a table in SQL in page 1 and then in page 2 call that table and set the values as variables. My question, then, is how I would set the default dropdown value to be a variable as opposed to a set value.
I am using VisualStudio2010 with ASP Webforms using C#.
View 5 Replies
Dec 8, 2012
I have 2 button and 2 text box in page.aspx
txt1Â Â Â btn1
txt2Â Â Â btn2
I want when users type on txt1 and press ENTERÂ it focus on btn1(i mean btn1_click event run)and when they type on txt2 and press ENTERÂ it focus on btn2 (btn2_click event run). How I can do it?
View 1 Replies
Aug 9, 2010
I got the viewCustomer.aspx page sending parameter to EditBusiness.aspx page as per below coding .
After that i retrieved to EditBusiness.aspx.cs by using (Request.QueryString["customerId"] ) and save in session . Then i tried to use the session in the EditPersonal.aspx and EditOther.aspx is worked but then back to EditBusiness.aspx the customerId parameter is disappeared . I believe is because in EditBusiness.aspx.cs using string customerId = Request.QueryString["customerId"] . Even I have tried cookies but its doesnt work .
ViewCustomer.aspx.cs
protected void grdCustomer_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Mod")
{
Response.Redirect("EditBusiness.aspx?customerId=" + e.CommandArgument.ToString().Trim() + "&mod=Modify");
}
EditBusiness.aspx.cs
string customerId = Request.QueryString["customerId"]
Session["customerId"] = customerId.ToString();
EditPersonal.aspx.cs and EditOther.aspx.cs
string customerId = Session["customerId"].ToString();
qry = "select *from customer where customerId = " + customerId;
View 4 Replies
Feb 7, 2011
I've got a request to redesign the web application to allow support for up to 3 users (before there was data only for one people on page). Since I don't want to build entire page again I wonder how is possible to replace value which is for example:
[Code]....
with value retrieved from querystring?
Users are displayed on page in row: querystring value ID(for example 123), QS value ID2(for example 231), QS value ID3(for example 343).
Users are all stored in one row of the same table. If second user is selected then value of his/her should be taken as value of ID.
I'm using quite a lot <%# Eval ("ID")%> on my page and I don't want to replace it with some object but just overwrite it's value according to querystrings values.
I hope this doesn't sound too complicated as the real problem is fairly easy but don't have ideas how to deal with it. I've thought I can put to replace the value retrieved from SP but I can only change parameters. And ID is not select parameter.
View 7 Replies
May 4, 2010
I have a website created in ASP.Net 3.5(C#) and I have configued asp.net defalut membership provider for it.There are 5 different type of roles in this site. Now I want to display a small role based (i.e. depending upon the logged in user's role) menu whenever a user log-in to the site.For this I have added the code in the OnPageLoad() event of the master page, here is the code -
[Code]....
Now I wanted to know Is this code is logcally correct? And what is the security level of this code?
View 5 Replies
Mar 26, 2016
URL....This link shows a demo that let user to put origin and destination then get direction. I want to know how to add a option which is let user to use their current location as origin location (Location from).
View 1 Replies
Apr 7, 2010
I have a table in my database, in which a certain field holds the locations of text or doc files (the files are of a transcript for a chat session).
In the Gridview right now i able to show the link locations. But i want to have Hyperlink or Button in the links location in the Transcript Location fields.And on the click of which the txt or doc file opens up in notepad or microsoft word.
View 2 Replies
May 7, 2015
Following is my code when user enters hospital name and city, he will be navigated to this page to show location on map. Now I want to get user current location and draw the route between current location and destination. Is there any way to integrate to geocoding and geolocation? Â
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
html, body, #map-canvas
[Code] ....
View 1 Replies
Feb 4, 2011
When i created a simple site via Matrix which adopts Razor technology by default, i found site automatically display "default.cshtml" if started through "http://localhost:xxxx/bread/" ; however i hadn't set "default.cshtml" as "default document" for this site, even i seek in the "applicationhost.config" i just find
<defaultDocument enabled="true">
<files>
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
which apparently hasn't "...cshtml" yet. So I am wondering now why in this case the web server actively sets "default.cshtml" as default start page ?
View 5 Replies
Sep 18, 2010
Here is my scenario.In default.aspx page user selects the country, state, city from drop down list, and store them in cache for further use. but when other user open the web site from other computer it shows the same country, state, and city selected by user 1. Is there any problem related to cache? I have stored data as following.
cache["ctryID"] = ctryID;
cache["stateID"]= stateID;
cache["cityID"]= cityID;
I want to show default country, state , city at page load of default.aspx
View 2 Replies
Apr 27, 2010
how to link to the location on the same page on the server side with LinkButton
View 3 Replies
Jan 30, 2010
I am currently using the LoginStatus Control to display the Login/Logout button. I want to change the location of the login page. Currently the login page is on login.aspx (default) but I want to have it so that when the login is pressed it re-loads the current page but attaches GET variables such as ?action=login to the URL. Reading through the .net documentation I found this: Quote: LoginStatus control provides a link to the login page defined in the application configuration settings. I'm not sure which configuration setting this refers to. Where exactly can I edit this value?
View 2 Replies
Feb 10, 2010
Here comes the noob question of the day... along with a little background to give the best possible response.I have been working with Intranet asp.net/vb project. A few (3 - 5) .aspx pages had been created before the project was handed down to me, along with a DataAccess module and a ReportTools module (both of these modules are located in the App_Code directory. Things are starting to get slightly more large-scale now, with a dozen or so pages, and I'm looking for the best way to organize my files, classes and modules.
I have a single .aspx and .aspx.vb webpage that needs a specific class to be implemented which will hold values accross post back. This class will only be used within this specific page, no where else. I could create this module (or class) within the App_Code directory, but it would seem better to have this class file located in a folder with the implementing page. An example would be (using the attached screenshot below) having a folder within "Merchandising", which will be titled "SalesRecapByDate" and within this folder will exist the SalesRecapByDate.aspx and SalesRecapByDateData.vb (my class/module). Only problem with this, I cant figure out how to import the class/module into my .aspx.vb page.So my question!! Would it be best to:A) Have a folder within the "Merchandising" directory, to hold my page and its corrosponding class?B) Create sub folders within App_Code to organize things a little better according to how / where they are used
View 2 Replies
Jan 15, 2011
getting an update page to return to the list positon of the just updated item.i have a long list of jobs (inserting a paging helper is a future project) that can have several operations performed on them.these operations take the user to a new page to get further info. when the info is submitted the list is loaded again, but at the top of the page.i have added an anchor tag to each item, but am unable to build the link to the anchor:
return RedirectToAction("Index#" + new { id = Head.ID });
gets translated into "<site>/Index%23246" where 246 is the id.in other words, the # is being converted somewhere to %23.so am i on the right track here, and just need to find a way to stop the # being translated?or is there a better way to get the list on the main page to scroll to the correct item?
View 10 Replies
Jul 26, 2010
I have a update progress control linked with an updatepanel in my ajax application.
Currently the UpdateProgess control is placed right after a menu of my web app, there are some chart and grid on the page, I want to show the UpdateProgess control in the middle of the page, if possible, add some effect like gray out the background, is it possible? how do I do this?
View 2 Replies
Jul 27, 2010
i have successfully deploy my reports to our SQL reportserver and i was able to display it in a reportviewer in my site. but my problem is my reports is requiring a parameter to display the report, at first the parameterPrompt is were i manually
encode the parameter value, but i need to dynamically pass the parameter value without manually encoding it in the parameterPrompt.
View 3 Replies