An http Get Command To be Sent To Another Ip?
Jan 28, 2011i have an aspx page with a button that when it is pressed i want an http get command to be sent to another ip.
View 9 Repliesi have an aspx page with a button that when it is pressed i want an http get command to be sent to another ip.
View 9 RepliesI'm trying to send an HTTP command using VB.NET and I'm not quite sure how to do it. I don't want to actually navigate to the page, just execute the command.http://xbmc.local/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.updatelibrary%28video%29hat I'm doing is building an integrated interface for my XBMC home theater, and my home automation.
View 2 RepliesI need to post a request to aspx page within dos command line.. How can I do that ?
View 3 RepliesI want to issue an INSERT command for an SQL Server table using DataAdapter without first issuing a SELECT command. Could anybody send me lines of code to handle this? Also how do i manage INSERT into selective table columns (I have 10 columns but i only want to update 2 of them)?
View 2 RepliesI am working with odbcCommand class, in one case I got error that QueryTimeout Expired. Even though this SP is taking only 3-4 secs in DB to execute these specific values, When I set the CommandTimeout=0, then it worked fine.
1)Is it necessary to always use this property while working with Command Class.
2)If it is not suggested to use, but still if I use it then how it will impact the performance.
Below is my code sample.
OdbcConnection conObj;
OdbcCommand cmdObj;
OdbcDataAdapter daObj = new OdbcDataAdapter();
public DataTable GetIFAContractNoteData(string RecipientIDIFACN, DateTime BatchDateIFACN, int TransmittalReportIDIFACN) {
conObj = new OdbcConnection(GlobalVariables.strDsnName + ";" + GlobalVariables.strDsnDataBase + ";" + GlobalVariables.strDsnUserID + ";" + GlobalVariables.strDsnPassword);
[code]....
[Code]....
Using above code, I got succeeded in printing PDF file through command line. But it runs the Acrobat Reader and opens Save dialog box.
In my case, I want to suppress Save dialog box and save the file on other location using c# coding. I mean I want to save a PDF file behind the scene.
I've recently started working in ASP.NET and RDBMS.I'm making a test form where I can do basic add,update,delete operations.I'm using OracleDataClient to do the DB operations.I was able to populate a listbox using OracleDataAdapter.
Now after clicking on update button,I intend to Update in DB.I've Dataadapter with it's update property.But the update query is not happening.The examples I saw over net all have Select command before Update.Is it actually like that or am I missing some point.
How does Oracle DataClient work with Insert,Update,Delete Commands.
When I use WatiN to go to a specific web page, how can I fake the HTTP referrer with a query string (i.e. request is from google search with query string q=search_term)? So I can verify that the response header has the 301 redirect for specific referrer URL.
View 2 Repliesi redirect a page from http to https using http module begin request handler .i am calling webservice using ajax but it is saying webserice not defined .which otherwise works fineits work fine when rediect page in page_load instead .but i need to add function for https to http in every page. i still not know why ajax is not working when i use http module for redirect
View 3 RepliesI am having problem redirecting error when error is http 500 or http 403 locally running this site there is no problem it gets redirected to my errorpage.aspx. But when deployed at server, it does not get .tried putting try and catch in page_load and in global.asax and I have set Application_Error to redirect to that page and also set <customErrors defaultRedirect to that page also
error
statusCode="500"
redirect="/errors/errorpage.aspx?error=500"
/>
i'm trying to issue a select command in my app soi could execute the command and retrive the data into a string variable.the problem is that this command is overloaded with DataSourceSelectArgument and i can't figure out what it is.i'm using sql server express and when issue a n insert command for example sq.Insert(); i have no problems.this the command that's holding me:
SqlDataSource sq = new SqlDataSource();
sq.ConnectionString = ConfigurationManager.ConnectionStrings["CustomerDatabaseConnectionString1"].ToString();
sq.SelectCommandType = SqlDataSourceCommandType.Text;
sq.SelectCommand = "SELECT * FROM CustomerTable where customerID = 1";
string result = sq.Select(some overload that's stopping me);
how would i do my Gridview delete command like a update command?
im using a datasource... and my delete command is like my update command... so i can change the status into "INACTIVE"...
DeleteCommand="UPDATE ACCOUNT_MAINTENANCE SET am_status = 'INACTIVE' WHERE (accmain_no = @accmain_no)"
UpdateCommand="UPDATE [ACCOUNT_MAINTENANCE] SET [account_type] = UPPER(@account_type), [min_deposit] = @min_deposit, [min_capital] = @min_capital WHERE [accmain_no] = @accmain_no"
when i press my delete command at gridview... the status changed into "INACTIVE" but when i refresh or press f5... it automatically update the status into "INACTIVE" also...
RedirectResult is doing a HTTP Get. I want a redirect that does a Http POST
View 2 RepliesI am facing problem in to redirect my site from http://example.net to http://www.example.net
When the user can enter the site name in address bar like http://example.net how can i automatically redirected to http://www.example.net
I am trying to change the properties in iis but it doesnot work.
how can i acheive this
Background:
We are using the Facebook API and receive back URLs for profile image thumbnails. Unfortunately the protocol is restricted to just HTTP and it doesn't support HTTPS. The page on our site that hosts the thumbnails is always delivered via HTTPS, and if we use HTTP for the thumbnails the user will receive security warnings from their browser.
Solution:
Build an HTTP Handler that "passes through" the image from the Facebook URL, but allow the handler to be called via HTTPS. Before I started coding I thought I could something like this:
Response.OutputStream = WebRequest.Create(FacebookUrlForThumbnail)
but I ended up having to save the image to an object in memory than write the image to the Response.OutputStream using the image save function.
Current Code:
[Code]....
This seems inefficient but I can't find a way of using the HTTP Handler as I orginally intended. Is there way of accomplishing the goal without creating the image memory and just "passing through" the call?
clear my concept What is HTTP module and HTTP Handler and how does they work while page requesting???
How authentication and Authorization process work in asp.net?
I mean what is their use . . .
View 2 Repliesave never used ajax.... I'm currently putting together a little web app that basically calls a program on the server itself (a command line tool) and displays the output to the web page.When the command line tool is run from the command line, it outputs status messages as it does it's thing... as it is now, my page just displays all the output when it's done. What I would like to do is show each line of output on the web page as they happen, just like when run from the command line. I'm guessing ajax is what I need... can anyone point me in the right direction for this specific scenario (user clicks button, output streams to web page as it happens without full page post backs)... a good example would be how ping.exe displays it's output on the command line
View 2 Replieswhat is doffrence between http://domain.com & http://www.domain.com where domain is the same name in both of this.e.g. http://mycompany.com & http://www.mycompany.comi
View 2 Replieshow to use the count command?and how can store the result of count command in a veriable of integer type?
View 4 RepliesMy program is doing good when I suddenly bumped into this problem. I dont know how to do the next functionality that I need to accomplish. I am done with inserting values, showing the gridview etc and it works great. Now my problem is the update command.
I have 2 tables
table: tblDest
Fields:
destLastName
destFname
destEmail
Table:tblSource
Fields:
Sourcelastname
SourceFname
SourceEmai
Now, when I run my update command in sql server, it works great! I just right click the database, click new query and i run this command:
Code:
update tblDest set DestEmail =(Select SourceEmail from tblSource where tblSource.SourceFname = tblDest.DestFname and tblSource.SourceLastname = tblDest.DestLastname)
what the query does, is it updates the table tbldest email where lastname and firstname exists in both tables that are equal,
the question is, I want to automate this, I am done with inserting values, the problem is, I dont know how to run the update command,
I tried doing this:
Code:
Dim sqlds As New SqlDataSource
sqlds.ConnectionString = ConfigurationManager.ConnectionStrings("sqlconnect").ConnectionString
sqlds.ProviderName = ConfigurationManager.ConnectionStrings("sqlconnect").ProviderName
sqlds.UpdateCommand = "update tblDest set DestEmail =(Select SourceEmail from tblSource where tblSource.SourceFname = tblDest.DestFname and tblSource.SourceLastname = tblDest.DestLastname)"
DestGrid.DataSource = sqlds
DestGrid.DataBind()
but nothing happened.
I've been trying to use the same SqlConnection and SqlCommand objects to execute to different commands.
the first one checks for duplicate and the second one inserts the data if the data the user entered is not a duplicate.
Here's a sample of my code:
using (SqlConnection conn = new SqlConnection(ConnStr))
{
string Command = "SELECT CountryName FROM [Countries] WHERE CountryName = @Name";
using (SqlCommand comm = new SqlCommand(Command, conn))
{
comm.Parameters.Add("@Name", System.Data.SqlDbType.NVarChar, 20);
comm.Parameters["@Name"].Value = Name;
comm.Parameters.Add("@IsVisible", System.Data.SqlDbType.Bit);
comm.Parameters["@IsVisible"].Value = IsVisible;
conn.Open();
if (comm.ExecuteScalar() == null)
{
Command = "INSERT INTO [Countries] (CountryName, IsVisible) VALUES (@Name, @IsVisible);";
comm.ExecuteNonQuery();
}
}
I was trying to save a trip to the database by using one connection.
The Problem is:
The first command runs okay but the second command which inserts into the database won't work (it doesn't add any records to the db) and when I tried to display the rows affected it gave me -1 !!
The Question is:
Is this is the ideal way to check for a duplicate records to constraint a unique country ? and why the second command is not executing ?
i'm tryng to pass a parameter with command argument with a link button but the result i get is always "".
this is in my aspx page:
<%
LinkButton1.CommandArgument = "abcdef";
%>
<asp:LinkButton ID="LinkButton1" runat="server" OnCommand= "LinkButton1_Click">
and in my aspx.cs i have:
protected void LinkButton1_Click(object sender,CommandEventArgs ee)
{
String id = ee.CommandName.ToString();
}
the id is always "" after i press the linkbutton.
I have the following sql command:
SqlCommand cmd = new SqlCommand("SELECT * FROM tbl WHERE ID = 'john' ", con);
How can i output the results of the following command in C# to my webpage?
How do you add command to a button programmticaly ??
I tryed this..its wrong:
Button1.Attributes.Add("CommandName",
"Sletimage");