How To Set Windows Parameters Programmatically

Jun 8, 2010

In C# and MVS2008, how do I do an equivalent of window.open() programatically from within the C# code (so not attaching JavaScript code to a button).

Is it possible to specify settings such as width, height, no scroll-bar, etc.?

Now I can open a new page by using Server.Transfer or Response.Redirect, but I can not seem to specify the new pages width, height, etc.

View 6 Replies


Similar Messages:

Set DPI Parameters And Scan Document Programmatically

Oct 21, 2010

I want to programticaly set DPI and allow user to scan document only not allowed to save it also.

View 2 Replies

ADO.NET :: Use Parameters With A Programmatically Created SQL Statement?

Dec 6, 2010

I have an internal web search on my website. Previous, it has been used to search by our partnumber only. This was nice and easy

SELECT * FROM View_ProductRange WHERE PartNumber LIKE '%'+ @Search +'%'

I have now built an internal search.

[Code]....

However, I can't use paramaters because the paramaters appear to be 'applied' after the SQL statement has been built, so it would only add the final word the customer searched for due to the paramater taking the final variable at the end of the Foreach Loop. e.g.

[Code]....

Is there 1) a better way to search and 2) a safer option/method/approach.

FYI, at the moment I have

strSearch = strSearch.Replace("'", " ");
strSearch = strSearch.Replace("drop", " ");
strSearch = strSearch.Replace("table", " ");
strSearch = strSearch.Replace("Insert", " ");
strSearch = strSearch.Replace("amend", " ");
strSearch = strSearch.Replace("apend", " ");
strSearch = strSearch.Replace("delete", " ");
strSearch = strSearch.Replace(""", " ");
strSearch = strSearch.Replace("--", " ");
strSearch = strSearch.Replace(""", " ");

but I don't like that (there is a ToLower() method used)!

View 3 Replies

DataSource Controls :: Programmatically Adding Parameters To SQLdatasource In Codebehind Using C#

Apr 1, 2011

I have a page called Page2.aspx and it is called by another page called Page1.aspx and Page1.aspx passes two parameters namely: Name and Category to Page2.aspx. Does anyone know why the following code from Page2.aspx is not working and it keeps giving an error message as follows: " You have declare the parameter @Username".

string Cat1;
string Name1;

[Code]....

View 2 Replies

C# - Passing Parameters In Windows Service?

Aug 18, 2010

I want to develop a windows service which will be accepting a datatable from an aspx page. Both the windows service and the website are hosted on same machine.

Also I need to set a date and time on which this service is to work. this date and time are to change according to customer needs. once again the date and time are to be fed from the aspx page.

View 6 Replies

How To Programmatically Download A CSV Using Windows Service Into Website

Feb 25, 2011

How to programmatically download a CSV using Windows Service into my website?

View 1 Replies

DataSource Controls :: Programmatically Setting ODS Select Method And Select Parameters?

Dec 22, 2010

The drop down list is used to determine what search criteria will be used to find an invoice. I tried to set the Select method in the switch statement. I don't understand how to set the Select Method and the select parameters programmatically though . I tried a few different ways but can't make the compiler happy. My ODS is in scope in the code behind. I'm not able to access it's properties though. The BAL resides in a separate project that is a ClassLibrary. I also have a using statement for the ClassLibrary project in the code behind.

give me an example of how to do this?

Mark up:

[Code]....

[Code]....

[Code]....

[Code]....

View 1 Replies

SQL Server :: What If Multiple Output Parameters And Input Parameters And Also Want A Select Table

Feb 16, 2011

[Code]....

When I want to get the output values its okay but I also want returning a table as a result data.But Datareader has no rows.is it possible if I want a returning query result and multiple output values togather ?I wrote a test above.I can get output values as sqlparameters. But Datareader attached to a Gridview is empty.can you detect whats wrong here and it doesnt return a query result.So stored procedure is not standart or ı am doing something wrong.this doesnt raise any exception.but not returning any data.

[code]....

View 8 Replies

How To Define A Route That Have 2 Optional Parameters In The Middle Of The URL The Start An End Parameters Are Digits

Jun 7, 2010

I want to define a route that have 2 optional parameters in the middle of the URL the start an end parameters are digits

[Code].....

View 1 Replies

MVC :: MVC3 RC2 Bug Binding From Request Parameters To Method Parameters?

Dec 10, 2010

Since ASP.NET MVC3 RC2 I encounter a bug when posting values to a controller method of which one of the parameter is a nullable int. Steps to reproduce:

I've created a test method

[code]....

In MVC3 RC1 this was working without any problems with the nullable int

Update:
I don't seem to have the problem with a newly created MVC3 website. What could I have in my project that influence model binding to nullable int's? And why would there be a difference between RC1 and RC2?

View 10 Replies

How To Get The Individual Parameters From The List Of Dynamic Parameters In A Webmethod

May 12, 2010

I am using jquery ajax method on my aspx page,which will invoke the webmethod in the code behind.Currently the webmethod takes a couple of parameters like firstname,lastname,address etc which I am passing from jquery ajax method using

data:JSON.stringify({fname:firstname,lname:lastname,city:city})

now my requirement has been changed such that,the number and type of parameters that are going to be passed is not fixed for ex.parameter combination can be something like fname,city or fname,city or city,lname or fname,lname,city or something else.So the webmethod should be such that it should accept any number parameters.I thought of using arrays to do so, as described here.

But I do not understand how can I identify which and how many parameters have been passedto the webmethod to insert/update the data to the DB.

View 4 Replies

Usage Of SQL Express From Microsoft Windows Server 2008 R2 Enterprise Edition (64-bit) To Windows

Oct 11, 2010

Microsoft Visual Studio 2010 was being used along with SQL Express for website development on the Operating System, Windows Server 2008 R2 Enterprise Edition of Intel Xeon CPU @ 2.13 GHz (2 Processors) containing 12 GB RAM with 64-bit Operating System. Website was developed along with the databases of SQL Express with the help of Visual Studio. Whether the developed website along with the databases may be used on the Operating System, Windows 7 of 64-bit? The website will used within Intranet. Which Operating System and configuration to be used for the Intranet Website?

View 1 Replies

Installing Windows Application On Client System (Example: Windows Update From Microsoft Site)

Nov 23, 2010

I have a ASP.NET application. From that, User register, User will get email after registration. My Req : When user click on link provided in email. Then it should go to my ASP.Net application page . That page should install a wincows application on Client system through web ( I was inspired by Microsoft Windows update from Microsoft site)

View 1 Replies

DataSource Controls :: Use Is Null In Query Without Using Parameters For It Or Should Use Parameters For This Field Where Value Is NULL

Jan 21, 2010

here is my code for selectiong some records from db table

string strSql = "select * from mtblNBD where SentTo=@SentTo and InternalStatus Is NULL order by DeadLine desc";
SqlCommand com = new SqlCommand(strSql, con);
com.Parameters.Add("@SentTo", SqlDbType.NVarChar, 50).Value = (string)Session["uname"];

here I am using parameters for SenTo field but not for NULL so it is ok... or should I use parameters for this field where value is NULL , if yes then how can I use parameter for this

View 8 Replies

Security :: Avoid Windows Login Userid And Password Window When Use Windows Authentication Mode For Website

Dec 30, 2010

I have been trying to avoid the windows login userid and password window when I use the Windows Authentication mode for a web site. I need to capture the the windows logon user name without prompting for the user id and password and display that on the web site. I had tried almost everything... changed authentication,security setups on IE and IIS etc... still not being able to avoid the window...

View 1 Replies

Asp.net - How The Word 'Windows' Is Related With The Term 'Windows Communication Foundation ?

Jul 30, 2010

I am beginner in the Windows Communication Foundation. I am reading about it. I am little bit confused with the word 'Windows'. WCF can be used for building the web services for window application as well as web application. Then what is meaning of the word 'Windows' in WCF ? Why we are calling it as a 'Windows' Communication foundation ?

View 5 Replies

Windows Authentication Of Intranet Website And Reappearing Windows Login Box

Mar 24, 2011

I'm trying to enable automatic Window authentication working on our ASP.NET Intranet. I've changed the Authentication on our IIS 7.5 server from Anonymous to Windows Authentication Enabled only, and changed the Web.config file for the website to:

<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>

The Windows login box appears when accessing the website via IE 8, I enter valid credentials, but the login window keeps reappearing as if it does not accept my credentials. By repeatedly cancelling the login box it disappears, and my login name can be viewed on the website. Is there any possible reason for the login box to keep popping up even though valid credentials are being entered? I've restarted the servers / cleared browser cache etc. Also, ideally I would like the user to enter the login details once in the login box and not be required to reenter login details whenever he reopens the browser.

View 3 Replies

Configuration :: Web.config Not Agreeing With Windows Server 2008 SP2 Or Windows 7

Mar 8, 2010

I've installed IIS for Windows Server 2008 SP2 and Windows 7. In both instances, I can't get even the simplest of ASP.net scripts to work (note: I'm ftping the published files from Visual Web Dev 2008 Express on XP):

------------------------------------LOCAL MESSAGE---------------------------------------------

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error

[Code]....

Line 36: ASP.NET to identify an incoming user.Line 37: -->Line 38:
<authentication mode="Windows"/>Line 39: <!--Line 40: The <customErrors> section enables configuration
Source File: C:inetpubwwwroot estweb.config Line: 38


------------------------------------REMOTE MESSAGE-------------------------------------------

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a

<customErrors> tag within a "web.config" configuration file
located in the root directory of the current web application. This
<customErrors> tag should then have its "mode" attribute set to
"Off".

[Code]....

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

[Code]....

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>

Can anyone tell me what I'm doing wrong here in the web.config file? This is killing me.

View 5 Replies

WCF / ASMX :: FTP Directory Listing In Windows Application But Not In Windows Service?

Dec 13, 2010

Iam using ftp client wrapper class for accessing ftp.

iam able to download files from ftp when used in windows application

when i try to use the same code with windows service i get an error

the error is

"The underlying connection was closed: An unexpected error occurred on a receive. "

this error i get on directory listing

the stack trace is:

[Code]....

Note:

FTP is getting connected throgh service
FTP is getting connected throug FileZilla, internet explorer

soruce code:

[Code]....

View 5 Replies

Refresh Parent And Ancestor Windows After Closing The Child Windows?

Mar 19, 2010

I have three windows:

1st - main window

2nd - child window - it's opened using window.showModalDialog from 1st widnow.

3rd - window - is an ancestor of 1st window and is's opened from 2nd window using window.showModalDialog.

And now what I need to achieve is to open 1, 2 and 3 window. Next after closing the 3rd one, refresh the 2nd one. And after closing the 2nd one, refresh the 1st one.

But there is one more assumption, I don't want to have any post-back during this process.

View 2 Replies

Installation :: Windows Azure & Windows Server 2008 R2 Not Working?

Mar 17, 2011

I just downloaded and installled the Microsoft Windows Azure SDK yesterday for the first time and I am having issues running the application as I all I am getting is 503 errors. I run Windows Server 2008 R2 on my development machine and even tested it on another co-workers 2008 R2 and couldn't even compile the application. He got this error instead "A problem occurred while trying to set the "References" parameter for the IDE's in-process compiler. Error HRESULT E_FAIL has been returned from a call to a COM component."

From within my Windows Server 2008 R2 Hyper-V Virtual Windows 7 x86 enviroment, I was able to successfully build and run the Windows Azure SDK and it even showed the base ASP.NET application.So my question is, does the Windows Azure SDK for Visual Studio 2010 w/ Visual Studio 2010 SP 1 installed not work under Microsoft Server 2008 R2?

View 1 Replies

Security :: Setting Up Windows Authentication In Windows 2008 RC2?

Sep 8, 2010

We have a working version of application (Intranet) with uses Windows Authentication deployed in Windows 2003. The application uses HttpContext.Current.User.Identity.Name to get the logged-in user. Here impersonate is turned off.Right now, we are move to Windows 2008 RC2 where this Windows Authentication problem arised. I have Digest Authentication and Windows Authentication enabled. And also I have enabled Anonymous Authentication enabled to avoid the Login dialog of IIS in the end-user IE. Now I am getting HttpContext.Current.User.Identity.Name as Empty. When I impersonate using username and password, I am used to login using that user but all the users uses the same user to login.Does any has solution for this?Deployment Server - Windows 2008 RC2 (IIS 7.5)Development - Windows 7 (IIS 7.5)I am new to IIS 7.5. Please give me a solution

View 3 Replies

How To Setup Windows Authentication On Windows 7 Development Environment IIS 7.5

Nov 2, 2010

My overall goal is just to get the logged on users information for an Intranet site I'm developing without them providing their login (since they are already logged into their computer). So far I just get 401.1 errors and it keeps asking for my login/password. Even though I provide my login/password, it still won't let me in.

I've Enabled Windows Authentication from IIS > Sites > Default Web Site, added this to my web.config:

<authentication mode="Windows" />
<authorization>
<deny users="?"/>
</authorization>

My Application Pool is setup as Integrated / ApplicationPoolIdentity for .NET Framework 2.0.

View 1 Replies

Installation :: Uninstall .net Windows Application From Different Windows User

Jul 7, 2010

We have a website portal hosted in Windows 2003 server. For security reasons we are using different windows Login user say (xxxx) for signin other than Administrator. Now with this user (xxxx) name I installed .net Windows Application. It was working fine. For some reasons I renamed the original windows Login user(xxxx) to different say (yyyy). Now this .net Windows Application is not working with (yyyy) and even it is not allowing me to uninstall it.

View 3 Replies

C# - How To Consume Windows Communication Foundation (WCF) By A Windows Service

Jul 28, 2010

When i create a Windows Service for getting information from a Web Application(ASP.NET c#) for scheduling some task in the client machine.

To consume WCF from the web application. I added WCF reference to Window Service project as a service reference, everything seems fine. It updated app.config file, added service reference etc.
it was not working.

[Code]....

View 1 Replies







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