Configuration :: Passing Variable Externally To VB.NET Web Application?

Nov 18, 2010

I need to make the connection string in my vb.net web application be passed into the app externally. This is so I can re-driect the app to use either a test or production database. The same idea as a .INI file in a windows base system. someone suggested to me I use XML but I dont know how to do that.

View 13 Replies


Similar Messages:

Configuration :: Web Application Stops Working Externally?

Nov 15, 2010

My webserver stop working. It gives time out error. There is nothing in the event viewer.

If I access the web app on the web server using [URL], it works fine. Also the html pages have no problem. Just the asp.net web applications.

View 2 Replies

Iis7 - .NET Changes To Externally Linked Config File Cause IIS Application To Restart?

Nov 25, 2010

I have a config file linked from web.config e.g.<features configSource="feature.config" />When I make changes to the "feature.config" file the IIS application appears to restart, is this expected behaviour?

View 1 Replies

Passing Page As A Variable?

May 27, 2010

I have this sub in a class modulePublic Shared RunMySub(ByVal P as Page) 'I need page ref in the class sub to clear cache like

P.Cache.Remove("MyCache")
end sub

When I call this sub 'RunMySub' from a page, it works fine, ok, great !BUT now I need to run it from another class module...so I did this

Dim mpage As New Page
RunMySub(mpage)
mpage = Nothing

I get the error : Cache not available...How can I pass a page from another class module , thats not a page, or some how manage cache functions on a class module without pass the page varible ???

View 2 Replies

Passing Javascript Variable To C#?

Nov 15, 2010

I just need to know how to pass a javascript variable to c# when i click on a button

View 2 Replies

ADO.NET :: Passing String Variable To SQL

Feb 22, 2011

I have this string variable:
[Code]....

I want to pass the string MON to the sql query: to replace trunc(sysdate) .
[Code]....

View 3 Replies

Application Variable Versus Web.Config Variable

Aug 24, 2010

Which is better from a performance perspective?

Accessing a Global Application Variable (Application["foo"])

versus

Accessing an AppSetting variable from the web.config

Does .NET Cache the AppSetting variables so that it is not accessing the web.config file with every use?

View 2 Replies

Passing Variable From Event To Page_Load?

May 19, 2010

I am thinking this is a pretty simple problem... but I can not get it to function.I just want to get the calendar control to change a date which subsequently modifies a database select statement. I can get the current code to process without error, but the variable set is always a click earlier. Of course, I want the variable to be set upon any change in the calendar control.

public partial class NewBusinessReport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

[code]...

Does this make sense? I just want it so that when SelectionChanged gets fired the Calendar1SelectCommandDate passes the correct date to the Page_Load page. The error I get now is:"The name 'Calendar1SelectCommandDate' does not exist in the current context"I get that the variable does not exist in the context. That actually seems to make sense based on what I have coded; however, I try to get that variable established and I still seem to be headed in the wrong direction.Basically, I have four calendar controls, one for a date (period 1 start, end and then period 2 start, end). I want to set the program so any change in that date sets off a new Select statement into the SQL server.

View 1 Replies

VS 2008 Passing A Variable Between Two Protected Subs?

Aug 31, 2010

I hope this is simple but I can't find any information when searching Google about passing a variable between two Protected Subs.

When I use the fileUpload tool within my webform I need to take the filename chosen and use it in a different Protected Sub

View 8 Replies

State Management :: Passing The Variable To Another Page?

May 3, 2010

want to use the value of a variable on to the other page, what i am supposed to do for that.i am novice at asp.net

View 8 Replies

DataSource Controls :: Passing A Variable In A SelectCommand?

Jul 7, 2010

I am trying to pass a variable within a selectcommand statment in ASP.NET and I have researched online how to do it but I can't seem to find a way to do it...What I am trying to do is write a code for a web page that will display a page with useful links on it where the links are separated into different topics and where everything is dynamically grabbed from a database. This is what I have so far:

<!-- Start MainContentRegion -->
<h1>Useful Links</h1>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"

[]code...

View 4 Replies

Web Forms :: Passing Variable To Javascript Alert?

Jul 1, 2010

protected void saveMergedFile(string[] ReportFiles)
{
foreach (string item in ReportFiles)
{

[code]...

View 24 Replies

Passing A JavaScript Variable To A Helper Method?

Feb 24, 2011

I am using ASP.NET MVC 3 and the YUI library.I created my own helper method to redirect to an edit view by passing in the item's ID from the Model as such:

window.location = '@Url.RouteUrl(Url.NewsEdit(@Model.NewsId))';

Now I am busy populating my YUI data table and would like to call my helper method like above, not sure if it is possible because I get the item's ID by JavaScript like:

var formatActionLinks = function (oCell, oRecord, oColumn, oData) {
var newsId = oRecord.getData('NewsId');
oCell.innerHTML = '<a href="/News/Edit/' + newsId + '">Edit</a>';
};

View 1 Replies

Web Forms :: Passing Value Of A Variable With URL Of The Hyperlink Control?

Sep 4, 2010

I have 10 hyperlink controls. Depending on which hyperlink is pressed I want to pass a value to the target page. I think the easiest way would be to pass the value using URL of the hyperlink controls. Something like <asp:HyperLink ID="HyperLink1" NavigateUrl="~/News.aspx?id=>. I can pass just a value, but I want to pass a value from a variable.

<asp:HyperLink ID="HyperLink1" runat="server"

View 3 Replies

Forms Data Controls :: Passing A Variable To Onclientclick?

Mar 10, 2011

I cant get this right

[Code]....

Where PKey is a variable that holds the Datakey

View 8 Replies

SQL Server :: Passing A Variable To A Remote Stored Procedure?

Feb 27, 2011

I have a SQL stored procedure on a SQL server that uses a variable to create a new database. This works in SQL I have a connection string that works I have added a sqldatasource to a webform, and configured the datasource to connect to the remote SQL database and am able to select my stored procedure. I am able to bind the variable to a control in the sqldatasource wizard (often two of the same control appear- if that is significant)

When I test the sqldatasource in the configuration wizard and put in a manual entry, the procedure runs and works

It is on the web page I am having troubles. I want the user to enter a name in a text box, click a button/link, and run the procedure. Ive used buttons and links...but not in the right way I think, becuase when I click them the stored procedure doesnt run.

As mentioned above, I have selected the right control in the sqldatasource wizard. So what do I need to do now?

Is it button click event? If so whats the syntax?

Should I be embedding my textbox in a dataview?

View 4 Replies

Forms Data Controls :: Passing Hidden Variable Value In DataNavigateUrlformatstring?

Jan 24, 2011

I am using ASP.NET 2.0 and C#. I have a gridview, which has a datanavigateurlformatstring, in which i am passing data in the gridview as querystrings.I have a hiddenvariable in the page. i would like to pass the hidden variable to the gridview in the datanavigateurlformatstring.Currently i have the gridview and hidden variable like this:

[Code]....

How to pass the hiddenfield value in the datanavigateurlformatstring?

View 3 Replies

Web Forms :: Passing Variable From Code Behind To A Java Script Function?

Feb 18, 2011

can I pass a variable from code behind to a javascript function. if so, do you have a sample demo.

View 1 Replies

How To Invoke Code Within A Web App That Isn't Externally Open

Sep 3, 2010

for example, you are caching data within your ASP.NET web app that isn't often updated. You have another process running outside of the app which ocassionally updates this data, when you do this you would like the cached data to be cleared immediately so that the next request picks up the new data straight away.The caching service is running in the context of your web app and not externally - what is a good method of calling into the web app to get it to update the cache?

You could of course, just hack a page or web service together called ClearTheCache that does it. This can then be called by your other process. Of course you don't want this process to be externally useable or visible on your web app, so perhaps you could then check that incoming requests to this page are calling localhost, if not throw a 404. Is this acceptable? Could this be spoofed at all (for instance if you used HttpApplication.Request.Url.Host)?

I can think of many different ways to go about this, mainly revolving around creating a page or web service and limiting requests to it somehow, but I'm not sure any are particularly elegant. Neither do I like the idea of the web app routinely polling out to another service to check if it needs to execute something, I'd really like a PUSH solution.Note: The caching scenario is just an example, I could use out-of-process caching here if needed. The question is really concentrating on invoking code, for any given reason, within a web app externally but in a controlled context.

View 2 Replies

Controlling Which WebMethods Get Exposed Externally In A WebService?

Jan 11, 2010

I couldn't think of a decent title, so let me first apologize for that. I have a WebService (call it A) written for my app so I can take advantage of ASP.NET 3.5 AJAX features. I use the generated JavaScript proxy to make AJAX calls.As a side effect, WebService A is exposed for anyone to add as a reference to another project, which is great, except I don't want certain WebMethods to be available to external applications (in the same domain, BTW).So I've got two questions:Is there a way to control the exposure of WebMethods in WebService A?

If there isn't, I'm thinking I'll just add a separate WebService (B) that exposes the WebMethods I need from WebService A. But then,How can I prevent other applications from referencing WebService A while still allowing the application it originates in to access it?If that's not possible, I'm not really worried about it. The apps are all intranet-only, I just don't want the WebServices to be abused.Also, there is a similar question here already without any good anwers. The asker describes almost the same situation I'm in: [URL]

View 4 Replies

Referencing Javascript Libraries Locally Or Externally?

Sep 13, 2010

We are currently developing an ASP.NET MVC application which will be deployed on a corporate intranet, with a slightly-modified customer facing version available on the public internet.We're making use of a number of external javascript libraries (e.g. jQuery) and a discussion has come up regarding referencing the libraries - should we reference them from an external source (e.g. via the Google load jQuery method) or keep our own version locally and reference from there?The project manager is a little concerned about having a 'dependency' on Google (or whoever) if we reference from there, and thinks that having our own copy of the library makes us more independent. On the other hand, I have heard there are a number of advantages to letting someone else host the library - for example, they handle versioning for us, Google aren't going anywhere anytime soon...

(for the purpose of the discussion assume the intranet we're hosting on has external access - obviously if it turns out it doesn't the decision is very much made for us!)So. Does this matter? And if so, what should we do and why?(I appreciate this is subjective - but it would be very useful to get advice from anyone with experience or thoughts on the matter. Not sure if this is a candidate for community wiki or not, let me know if I should have put it there and I'll know for future!)

View 5 Replies

State Management :: Use Session Variable From Application To Another Application?

Apr 27, 2010

I Want To Use A Session Variable From One Application to Another Application. Is That Possible in ASP.NET 3.5 Or Greater To Use Session Variables As i Required. My Both Applications Host In Same IIS Server.

Me To Sort Out This Prob. ASAP

View 1 Replies

Passing Data From Windows Application To Web Application?

Apr 26, 2010

I have a windows application and a web application. The windows as well as web application has a login page. The username and password are same for the windows and web application.

In the windows application, the user enters the username and password. With this username and password in windows application, is it possible to log into the web application? If yes, How to pass the data from windows application to web application, thereby logging into the web application. Is it possible to pass the username and password from a windows application to a web application?

View 5 Replies

WCF / ASMX :: Passing Value From Web Application To Windows Application?

Aug 17, 2010

I have a web page where I used a gridview and a button.When selecting rows in the grid and click on the button another windows application fires.I need to pass the values of the selected rows to the windows application.

Rightnow I'm saving the values in an xml file and fetch the values in the windows application.But this is not practical when creating xml files with random numbers(Scan125.xml,Scan7867.xml,etc).

View 1 Replies

Web Forms :: Passing Values From One Application To Another Application?

Nov 22, 2010

I am using Multiple applications with single login. Login page also in seperate Application.

I want to send secured values from login page to another application based on logincredentials. Those values shouldnt visible to Any one.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved