Web Forms :: How To Call Exe File With Parameters

Apr 23, 2010

i want to call an exe file from ASp.Net web application with parameter/arguments the file is running fine if we run it from the command prompt with the following C:/Interpub/wwwroot/projectName/Name.exe /order=7501 this will generate pdf But When we used it in web apps it doesn't work we also tried with the IExplorer.exe it works

View 2 Replies


Similar Messages:

Web Forms :: Call URL And Get Parameters Returned?

Apr 28, 2010

How can I call a URL ex.

[URL] and get the values returned from it in VB.NET ?

View 7 Replies

Stored Procedure Call With Parameters In .NET MVC?

Apr 22, 2010

I have a working controller for another stored procedure in the database, but I am trying to test another.

When I request the URL; http://host.com/Map?minLat=0&maxLat=50&minLng=0&maxLng=50

I get the following error message, which is understandable but I can't seem to find out why it occurs;

Procedure or function 'esp_GetPlacesWithinGeoSpan' expects parameter '@MinLat', which was not supplied.

This is the code I am using.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web; [code].....

View 2 Replies

Call SQL Function With Multiple Parameters From C# Web Page?

Mar 30, 2010

I have an MS SQL function that is called with the following syntax: SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = 7 AND LocationName = ''Default'' ', 10) The first parameter passes a specific WHERE clause that is used by the function for one of the internal queries. When I call this function in the front-end C# page, I need to send parameter values for the individual fields inside of the WHERE clause (in this example, both the ClientID & LocationName fields) The current C# code looks like this:

String SQLText = "SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE
ClientID = @ClientID AND LocationName = @LocationName ',10)";
SqlCommand Cmd = new SqlCommand(SQLText, SqlConnection);
Cmd.Parameters.Add("@ClientID", SqlDbType.Int).Value = 7; // Insert real ClientID
Cmd.Parameters.Add("@LocationName", SqlDbType.NVarChar(20)).Value = "Default";
// Real code uses Location Name from user input
SqlDataReader reader = Cmd.ExecuteReader();

When I do this, I get the following code from SQL profiler:

exec sp_executesql N'SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable
(''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)',
N'@ClientID int,@LocationID nvarchar(20)',
@ClientID=7,@LocationName=N'Default'

When this executes, SQL throws an error that it cannot parse past the first mention of @ClientID stating that the Scalar Variable @ClientID must be defined. If I modify the code to declare the variables first (see below), then I receive an error at the second mention of @ClientID that the variable already exists.

exec sp_executesql N'DECLARE @ClientID int; DECLARE @LocationName nvarchar(20);
SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable
(''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)',
N'@ClientID int,@LocationName nvarchar(20)',
@ClientID=7,@LocationName=N'Default'

I know that this method of adding parameters and calling SQL code from C# works well when I am selecting data from tables, but I am not sure how to embed parameters inside of the ' quote marks for the embedded WHERE clause being passed to the function.

View 1 Replies

How To Call A Stored Procedure With Parameters From C# Code Behind

Sep 1, 2010

I have created a stored procedure shown below ,how will i call this from c# code behind to get the result and results are stored in dataset.

USE [Test]
GO
/****** Object: StoredProcedure [dbo].[tesproc] Script Date: 09/01/2010 13:00:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[tesproc]
-- Add the parameters for the stored procedure here
@a float, @b float, @c float,@d int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

-- Insert statements for procedure here
select Id, Name1,ZipCode,StreetName,StreetNumber,State1,Lat,Lng, ( 6371 * ACOS( COS( (@a/@b) ) * COS( (Lat/@b) ) * COS( ( Lng/@b ) - (@c/@b) ) + SIN( @a/@b ) * SIN( Lat/@b ) ) ) as distance from business_details where ( 6371 * ACOS( COS( (@a/@b) ) * COS( (Lat/@b) ) * COS( ( Lng/@b ) - (@c/@b) ) + SIN( @a/@b ) * SIN( Lat/@b ) ) )<@d
END

If i execute this stored procedure in sql server its working fine with this following call

exec dbo.tesproc 12.9216667 ,57.2958,77.591667,1

View 2 Replies

SQL Reporting :: How To Call Multi-value Parameters In SSRS From Application

Oct 6, 2010

i am trying to call an SSRS report (in VS 2005) from my asp.net (web application) implemented in VS 2008 (don't ask me why, i am kind of confused by this weird arrangement too). report has been deployed to report server and it contains a multi-value parameter.when i call report from asp.net app, i set the value for this multi-value parameter as a string and all selected values are separated by comma. i.e. i have 5 options (a, b, c, d, e), and i selected first two, the string is then "a,b".

the multi-value parameter on the report side is defined as: Multi-value selected, Allow blank selected, Avaliable values are from query (a dataset that contains a, b, c, d, e) Value field and Label field are both mapped to dataset filed (there is only one field in the dataset). the default values are from query too (same dataset). value field is mapped also.

i have two problems:

1: it looks to me that all available values are selected on the report side, regardless what i really selected and passed over (when i turn on paramters).

2: when i turn off parameters, i need to display what values being selected as a string, the join statement, join(Parameters!TeamLead.Value), gives a list of all available values for the multi-value parameter, however, i only need selected values. how should i write this expression (for a textbox) to join only selected items in the multi-value parameter(i don't see any option in the intellisense dropdown box)?

View 2 Replies

Javascript - Ajax Call Pass Parameters To Function?

Feb 7, 2011

What is wrong with this code? I am trying to pass parameters to a WCF function. I couldn't get this to work. I am getting Ajax error.

$.ajax({
url: applicationPath + "/Test.svc/GetData",
type: "POST",
dataType: "json",
data: '{GId":' + sender.get_value() + '"GName":' + sender.get_text() + '"mId":' + testId + '}',
contentType: "application/json; charset=utf-8",
success: function(result)
{
//trying to fill combobox here
},
});

View 1 Replies

AJAX :: Ext TextField To Call A Javascript With Parameters Onchange?

Dec 3, 2010

I'm using Ext Ajax TextField, I need to call a script with 3 parameters.this script actually worked out fine for my ASP TextBox control.I tried the following ways i dont know where i'm naking mistake.

Script On the .aspx page:

<script language="javascript" type="text/javascript">
//Allow only Numeric values
function ValidateTextAsNumeric(evt,target,validator)

[code]...

how to use listerner? to call a javascript or Solution to restrict to disable pasting strings into NumberField.How to pass the event, client id and the validator(to be disabled Onchange)

View 1 Replies

Jquery Ajax Call To Web Service - Can´t Pass Parameters?

Nov 6, 2010

I´m using jQuery to make the ajax calls to web services. I´m not using json, I want the information in XML. If I don´t pass parameters and I make the WS parameter less it works but if I want to pass a value as parameter (I tried int and string) it doesn´t work. Here is my code:

jQuery: [Code]....

The web service

[Code]....

The error that I get from firebug is an exception System.InvalidOperationException and it says that the parameter region_id is missing.It can´t be very difficult because it works without parameters but all the information I find in internet

View 5 Replies

MVC :: Making An Html Button Call An Action Method With Parameters?

Mar 10, 2011

how to make a stadard HTML button call an action method and pass parameters to it? Can you please show me an example of how to do this? THis is the method:

public ActionResult CCDReview([DefaultValue(1) int CUrrentPage])
{
//method code is here.
}

Yes, my button is wrapped in a form, and it's a "submit" button.

View 9 Replies

ADO.NET :: How To Call A Stored Procedures With Varchar Output Parameters In LINQ

Oct 15, 2010

I have a stored procedure with the following structure:

[Code]....

View 4 Replies

Databases :: Call Db2 Store Procedure With Parameters From .net Using Microsoft OLE DB Provider For DB2?

Jul 20, 2010

How can i call db2 store procedure with parameters from asp.net ( C# ) using Microsoft OLE DB Provider for DB2. I am able to connect to database. What is the syntax to call a store procedure?

View 2 Replies

Web Forms :: Run An .exe File Within A Website & Pass Parameters?

Jan 14, 2011

1) I have an .exe program that checks for the current directory and generate two .txt files from a .xml file. It should store the results of the two .txt files back into the same location as the .exe I heard that I should not be able to execute the .exe file within the website ??

2) I also have an .exe that generates a folder browser that I am using to allow my user to store the data the user downloads from the website. I am currently passing the full path name of the folder by storing in in my C: drive, but that may not be possible on a website? How would you pass the full folder path so that I can read it within my website form and store the downloaded data to ???

Currently the folder browser .exe code is also on the c:drive, where do you recomment me to put it to use for the website ???

I am not sure if I have access the a drive (like c:) on a real website.

View 3 Replies

Web Forms :: Uploading File With Database Parameters That Need To Return Nothing On Update?

Sep 14, 2010

Got a problem with regards to the file upload control on database updates. The problem is in my CMS, when a user tries to update content for a page it will add null to the fields containing the image path. What I need is for the system to check if the uploader has no image and if hasn't it has to do nothing. It can't add empty strings or null values as this will remove the original image path. Although they still need to be able to do image updates if the uploader has a file(this bits not a problem).

Here is a snipet of code to demonstrate what I'm trying to achieve.

[Code]....

View 1 Replies

Web Forms :: Call Ext. Js File?

Mar 15, 2010

my aspx file is include in master page.

now i can't call js function which i already include in the file when page is loaded.

page_load (cs file)
Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "1", "test.js");
Page.ClientScript.RegisterStartupScript(this.GetType(), "2", "<script type="text/javascript">testing();</script>");
test.js
function testing(){
alert("test");
}

but an error msg occurs: object expect?

View 1 Replies

Jquery - JSON Can Call Method In .aspx File But Not In .asmx (web Service) File

Jul 3, 2010

I am using JQuery & JSON (POST) to call webmethod. However I can call only webmethod located at aspx file but not in asmx file Below are sample codes

CustomValidate.asmx
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Public Class CustomValidate
Inherits System.Web.Services.WebService
'ACCESS VIA JSON
<System.Web.Services.WebMethod()> _
Public Shared Function AJAX_Test(ByVal date1) As Boolean...
Return True
End Function
End Class
Javascript: JQuery JSON
function isDates(source, arguments) {
var isValidDate;
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "CustomValidate.asmx/AJAX_Test",
data: '{date1: "' + arguments.Value + '"}',
dataType: "json",
async: false,
success: function(result) {
isValidDate = result;
},
error: function(httpRequest, textStatus, errorThrown) {
alert("status=" + textStatus + ",error=" + errorThrown);
}
});
arguments.IsValid = isValidDate;
}

It always return javascript undefined error. But if I put the AJAX_Test webmethod in aspx page and replace the url: "CustomValidate.asmx/AJAX_Test" to "mypage.aspx/AJAX_Test". It works fine.

View 1 Replies

Web Forms :: How To Call A Class File

May 1, 2010

I wants to create a class file which contains the information about the salary calculation and call it on my page. hra,da,medical every thing is defined in percentage in that class and on my web page when i insert the basic salary in a textbox and click the button it will show the whole salary on a label.

View 2 Replies

Web Forms :: How To Call SQL Database Connection In .vb File

Apr 30, 2010

I have a simple upload page that will upload a file to a server and when the "upload" button is clicked, the file is uploaded to the server and then a bulk insert command is made from the .vb file. I have the database connection in the web.config file but I don't know where to add the ado connection and command structure in the .vb file. I also don't know where to put the bulk insert. I'm assuming that it goes in the .vb file as well. Here is my .vb file as it stands currently

[Code]....

View 7 Replies

Web Forms :: Can't Call Method From Aspx File

Dec 2, 2010

I have a base class for all my user controls. In the base class I've got a method GetText() which returns a string.

When I do like this in the page load event it works fine:

[Code]....

View 5 Replies

Web Forms :: ID From Database To Call Specific File?

Mar 24, 2010

I have a web program that creates a url for a file, where it usually calls

item.Url=downfile+"?fileid="+reader["id"];

which save the item url. Which is called up again when trying to access the file (tho only for half a second)

websiteURL/DownFile.Aspx?fileid=8 what I want to do is to make this not so easily changeable. Now I still need the ID from the database to call that specific file. is there anyway I could do this? or is the best option making my ID field a hash and basically unreadable thus making it hard for anyone to guess the fileid. I have tried reading some Encrypt QueryString documents but they don't seem to be what I am looking for, as the url is saved to the item before any QueryString is called.

View 1 Replies

Web Forms :: Upload .docx File To Server And Use .aspx To Call It?

Jan 5, 2010

i was trying to created a gridview table that you will be able to upload a .docx documents and then when the user use it , he or she can click on the ID then the words documents will show up .

View 6 Replies

Web Forms :: Call Common Methods From A File Called CommonMethods In AppCode Folder

Jun 12, 2012

i have few most commonly used menthods defined in a file called  CommonMethods in App_Code Folder of my asp.net project. how can call them in an *.aspx.cs page.

View 1 Replies

C# - How To Point URL From Global File Using URL Routing 3.5 Without Parameters

Nov 26, 2010

How to point url from Global file using URL routing 3.5 asp.net without parameters?

For example:

[code]....

View 1 Replies

Dynamic Parameters For Attributes - Drop .cs File?

Sep 28, 2010

I know parameters to attribute declarations have to be a constant expression and resolved at compile time. However, can I play with the concept of 'compile time'? ASP.net has the concept of App_Code folder. It looks from it's description like you can drop .cs files into it, even while the app is running, and it will be brought in and compiled. Is it possible to use this mechanism to dynamically create an Enum or const array that can be used in an attribute declaration?

[SomeAttribute(ValidTypes.SomeType)]
public class Foo
{
}

Basically, I want to dynamically grow the valid types in ValidTypes without having to recompile all components that reference it. And I need to keep it in sync with a list of values in a database table. So, my question is, can I drop a .cs file with the definition for an Enum or const string array into App_Code and have it automagically show up? Or better yet, is the mechanism .Net uses to do this available to be called elsewhere so I don't have to do it in an ASP.Net app?

View 1 Replies

Html - MVC File Upload Post Parameters?

Aug 30, 2010

I am trying to go to a view with a speicifed batchId parameter wrapped in a ViewModel, pick a file to upload, get the uploaded file back and store the file data w/ the associated BatchId value in a database.When the form is submitted I don't know how to get back the viewmodel and the PostedFileBase so that I can get the BatchId value.I need the batchId value to associate it with the data I am storing in the database.I have the following Action Method in my Controller to allow adding new customers to the specified batch by means of a file upload and import:

public ActionResult AddCustomers(int batchId)
{
var viewModel = new AddCustomersViewModel() { BatchId = batchId, //other view

[code]...

View 1 Replies







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