Location Of Class Used On A Single Page?
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
Similar Messages:
Nov 30, 2010
I know practically nothing about AJAX, but fully intended to utilize it in the future. Right now though I am noticing a behavior that may require that I implement it sooner then I planned.
I have been working on a fairily sophesticated web form that is made up of tables, dropdown lists, map buttons, and labels. As various controls are selected, specific tables are enabled or dropdowns/labels populated with information. All of this is working great, but when I put it all on a server and accessed it from a remote location, I noticed that every single action caused the entire page to reload.
From what I have read, it looks like AJAX and the UpdatePanel control will allow me to only refresh those areas that should be refreshed. Before I look further into implementing this, is this the only way to go? From what I have read on some other blogs, the UpdatePanel has some high performance costs.
View 3 Replies
Mar 7, 2011
I have a web application and I want to provide anonymous access to a couple of the web services in it so that we can access the web services from computers without a windows login on our network.
I've tried the stuff here Disable authentication on subfolder(s) of an ASP.NET app using windows authentication. I've done this:
[Code]....
These both "work" in that they allow access to the web service for anonymous users. However, it seems that IIS still sends an authorization challange because when I access the service from a browser I get a box to enter my username and password. If I hit cancel I get access to the page anonymously. However, some of our clients don't handle this well and just fail because of the 401 return code.
Is there a way to completely disable the windows authentication on that single location such that IIS will not try and establish a windows authentication?
View 3 Replies
Jan 6, 2011
I'm struggling to find a way of specifying a file location in web.config appSettings that avoids using hard-coded paths but allows a non-'web aware' C# library to find a file. The C# library uses standard File.Open, File.Exists methods, etc. to operate on a data file, which is stored in my web application (ASP.NET MVC) tree, e.g. under:
contentdataMyDataFile.txt
Requirements:
I want to be able to specify my path like, e.g.:
<appSettings>
this--> <add key="MyFileLocation" value="~contentdataMyDataFile.txt" />
not --> <add key="MyFileLocation" value="c:inetpubwwwrootfoocontentdataMyDataFile.txt" />
</appSettings>
I don't want the C# library to be aware of the web application it's being used in, as it is used in other software, and the web application has no need to know about the configuration of the C# library.
View 3 Replies
Dec 1, 2010
I am used to making separate Business Object and List<> classes for my DB tables. Sometimes I just have a basic task in hand as displaying a list of year for a search box or having some values in a drop down.
Right now I am ending up with a lot of separate classes and List classes<> for these basic operations.
How can I make a single class for some basic tasks as these by using generics? I want to have single class for some methods like get current year, employee names, Department Name/Code, Title etc. I am using .NET 2.0.
Edit
After some searching, I found that I can achieve similar tasks by creating a DTO namespace.
What I don't get right now is how to create multiple classes inside my DTO class. Say 1 class for just returning 'year', One for 'Employee Name/Code' and so on inside the single DTO class.
View 1 Replies
Jun 23, 2010
I've created a service (class library) that uses a few other class libraries within its solution.
When I try to use this service dll in a website the system requires me to also deploy all of the child dlls of the service to the website.
I'd like to combine the service dll and all of its child dlls into a single dll.
I found a reference to "ILLINK" on the web as a tool that's supposed to enable this.
Is there a tool built into the .NET framework that will do this? It seems like it would be a not-uncommon requirement.
View 3 Replies
Oct 21, 2010
I'm fairly new at writing c# with asp.net and thought I'd give writing a custom class for a single file uploader, but Im a bit stuck with it. I get build errors with a few of the items, here's my code:
[Code]....
View 1 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
Jun 17, 2010
so how to bind detail view to a single record custom class?
[Code]....
Apparently I can do it this way.
[Code]....
But I don't think my way is a proper way..
View 3 Replies
Jan 6, 2011
i have an application consisting of two asp.net projects. And i have have a BasePage which inherits System.Web.UI.Page and have the class some core logic which i require in all of my pages(Implemented in BasePage.cs). So all my pages inherit this BasePage.cs . Now can an Webservice inherit the same class apart from the normal webservice class System.Web.Services.WebService
View 4 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
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
Mar 16, 2011
I might be asking a dumb question, but I have a client for whom I need to build many websites (10+) (asp.net 3.5) which will all the pages on each site will have the same codebehind, but the sites will launching in different regions and whilst following the same template, will have different content.I have built and launched site 1, and sites 2, 3 & 4 is nearly live, but it occurs to me that as all the sites are basically the same, the code is going to get more complicated to update as it will be duplicated, so if I need to do a bug fix on one site, I'll need to do the fix on all websites (and this is going to get complicated.)
I was wondering if it possible to somehow create a class library of all the current aspx.cs files, reference this dll in each website and then inherit these classes into the .aspx.cs files. So default.aspx in each site would still have a CodeFile of "Default.aspx.cs", but Default.aspx.cs would inherit the corresponing class from the dll:
using WebPagesClass;
public partial class _Default : WebPagesClass._Default
{ }
The reason for doing it like this is that if I need to change any code on a specific website (for minor changes in languages for instance), I can override the page functions and change the parts required. For all other pages which have not cha, I can just copy from a single website.Is this vaguely possible? If not anyone one got any killer suggestions of how to manage so many websites from a single codebase?
View 2 Replies
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
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
May 16, 2010
I have a web page that opens another web page in a pop up window. I would like to refresh the parent page when the submit button is clicked on the pop up page. I tried using window.opener.location.reload(); in IE7 but nothing seems to be happening.
View 15 Replies
Jun 21, 2011
I'd like to add google maps to my web page. I am looking for a way that user will seach for desired location. In google's page [URL] .... there is a really nice search mechanism, by simple typing location in a text box. Is that mechanism available for sites or do i have to create mine..
View 8 Replies
Mar 29, 2010
I am using a custom error page in IIS 6:<customErrors redirectMode="ResponseRedirect" mode="On" defaultRedirect="Error2.aspx"/>I want to disable authentication for the custom error page because the error being raised is related to an authentication module and I don't want to get into an infinite loop and I want to display a clean error page to the user. I have been trying the following configuration to do that.
<location path="Error2.aspx">
<system.web>
<authentication mode="None"/>
[code]...
View 3 Replies
Sep 7, 2010
I need to have a GridView show up at some precise place on a page. I tried to do this by defining the GridView into a cell of a table. It did not work ... the GridView populates OK, however it shows up under my table.
Is there any way I can make this GridView show up at the right of my table and span the 4 or 5 rows I have in this table?
View 5 Replies
Jul 4, 2013
I am working on website development in asp.net. where i have used Master Page concept and content page. and by using dropdownlist I am changing its language.
View 1 Replies
May 19, 2010
I have a stored procedure that returns 3 tables within the single recordset it returns. If I set a SqlDataSource to get data from this procedure, it works, but it only returns the first table. I want to have a GridView display the data from the 2nd or 3rd table using a SqlDataSource, but I can't figure out how to specify a particular table.
While there are some posts discussing this out there, I can't get a definitive answer about whether or not this is even possible (?). In a worst-case scenario, I can create another SP that only returns the 3rd table - but that creates a little maintenance headache that I would prefer to avoid.
View 4 Replies