|
|
|
Can anybody please tell me how to send an xml file to a remote webmethod as an input? we dont have any access to the webmethod code and dont know the implimentation part. We just need to send our input file in xml format or the xml text itself to the webmethod and the webmethod is going to return an output xml string to us. I need to do this using aspx page and c#.net language. I tried sending the xml text with httpRequest and Response, but I got forbidden error from the server. my problem is just how to send a text in the form of parameter to any webmethod?
thanks in advance,
regards,
anil
|
|
|
|
|
|
thanks for the link...will go through it.
|
|
|
|
|
Because the server response says something about forbidden , so IMO you first need to make sure that the web service is accessible to your client side code, then have a look at the contract of the service to make a call properly.
|
|
|
|
|
thanks for the suggesion. i finally found out that there was one tag which was not being accepted by the webservice. there was no syntactical problem with the tag. but after removing that tag, the request went successfully! this is strange. but i am trying to find the real casue.
any way.. thanks for your help.
-- modified at 2:45 Monday 28th August, 2006
|
|
|
|
|
I created the asp.net project.
It contains with java script, htm and aspx.
java script for the menu, when user click the link load the relevent pages.
htm page load without problem, but aspx pages not load, giving the following runtime error.
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".
<configuration>
<system.web>
<customerrors mode="Off">
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.
<configuration>
<system.web>
<customerrors mode="RemoteOnly" defaultredirect="mycustompage.htm">
please help me to fix that error and tell me whats the reason?
i already set the customErrors mode to the off
i need your help immeadatly
thanx
Software Devolper in future.
|
|
|
|
|
Your code snipets are not displayed. Check the checkbox "Ignore HTML tags in this message (good for code snippets)" to your post. We cannot see the code.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
I created the asp.net project.
It contains with java script, htm and aspx.
java script for the menu, when user click the link load the relevent pages.
htm page load without problem, but aspx pages not load, giving the following runtime error.
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".
<!-- 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.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
please help me to fix that error and tell me whats the reason?
i already set the customErrors mode to the off
i need your help immeadatly
thanx
Software Devolper in future.
Software Devolper in future.
|
|
|
|
|
Try opening the same page on the server with server name as localhost. It will show the error details on the screen. You should be able to digout using those details.
- ashish
|
|
|
|
|
Hi,
I am using inbuild datagrid paging.
I don't want to display pagenumber(i.e 1 2 3.....) if there is only single page in datagrid.
Anybody knows how to do this.
thanks.
Nagraj
|
|
|
|
|
if datagrid1.pageSize<10 then '10 is your pagesize
datagrid1.allowPaging=false
else
datagrid1.allowPaging=true
end if
With regards,
Suresh Dayma
-- modified at 6:40 Friday 25th August, 2006
|
|
|
|
|
Yes,I want to display pagenumbers.But i don't want pagenumber when there is single page in grid.
I mean if pagesize =5 and only 4 records are there in grid,then pagenumber shows 1.This 1 I don't want on single page
I hope now i am clear.
|
|
|
|
|
Hey,
To give you my back ground, I come from a strong C++ background and have been using asp.net (c#) for a couple of months now and am not bad. I can create registration sites, secure logins, connecting to databases etc..
Now I just had a friend who needs someone to code the backend for a e-commerce site, the interface will be built by the other person but they need me to handle the backend coding, so basically what i would like advice on, is should I take the job?
I am not actually sure how big of a job this is. I know that the customer needs to be able to pay for the items by credit card. I am pretty sure I will need a secure site, and use of a ssl certificate, and the use of a merchant account from a bank? but again I dont (at the moment) have much experience.
If anyone could give me advice on whether A. I would be able to complete the job, B. How long should it should take, anc C. any good articles that could get me on my way I would be much appreciative.
Thanks for your time.
|
|
|
|
|
|
Hey,
To give you my back ground, I come from a strong C++ background and have been using asp.net (c#) for a couple of months now and am not bad. I can create registration sites, secure logins, connecting to databases etc..
Now I just had a friend who needs someone to code the backend for a e-commerce site, the interface will be built by the other person but they need me to handle the backend coding, so basically what i would like advice on, is should I take the job?
I am not actually sure how big of a job this is. I know that the customer needs to be able to pay for the items by credit card. I am pretty sure I will need a secure site, and use of a ssl certificate, and the use of a merchant account from a bank? but again I dont (at the moment) have much experience.
If anyone could give me advice on whether A. I would be able to complete the job, B. How long should it should take, anc C. any good articles that could get me on my way I would be much appreciative.
Thanks for your time.
|
|
|
|
|
Hi,
I am trying to create a TreeView programmatically, but cannot get my EventHandler to work - unless I do like below - is that really the way to do it?
I want to add a TreeView and when the user posts back some data, I want that data in the TreeView. My first thought was to put in if (!IsPostBack) before the CreateTreeView() call and then add the data in the EventHandler and then calling the CreateTreeView() at the very end. This, however, does not add the EventHandler
Do you really have to create the control twice? Once with the pre postback data and then one after adding the postback data to the control. The example below is very simple, but in my real app it will cause a lot of trouble as there are many controls with EventHandlers being added.
Can you execute any code after the events have fired?
I have been looking high and low for an answer, but have found none, so I hope some one can help
If you need more info, please let me know.
Kind regards,
Lars
public partial class _Default : System.Web.UI.Page
{
StringCollection nodes = new StringCollection();
TreeView TreeView1 = new TreeView();
protected void Page_Load(object sender, EventArgs e)
{
TreeView1.SelectedNodeChanged += new EventHandler(NodeChanged);
nodes.Add("Node1");
//if (!IsPostBack)
CreateTreeView();
}
protected void NodeChanged(object sender, EventArgs e)
{
// This could be data added by the user
nodes.Add("Node2");
CreateTreeView();
}
void CreateTreeView()
{
TreeView1.Nodes.Clear();
foreach (string s in nodes)
{
TreeNode node = new TreeNode(s);
TreeView1.Nodes.Add(node);
}
this.form1.Controls.Add(TreeView1);
}
}
|
|
|
|
|
The thing is that the postback resets the page to it's original state, so any information regarding the dynamically created controls is lost. Why is that? Because the Page class is stateless. The Page recreates child controls based on the tags in the aspx files, so your controls not being present there are not shown. That's why you need to recreate them. Their values are persisted in ViewSate however, so you only need to create the tags again (with the same ID of course) and you do not have to assign values again (that is if you want the values of the controls as they were on postback.
There is no other way around it. It's how ASP.NET works.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Thank you for the answer
|
|
|
|
|
Can we make two function in a class that have same name and same number of parameters but function return types are different.
Can anybody help me.
Thanks in advance.
kartik rathi
|
|
|
|
|
|
Ya I too think so you need to have some difference in the parameters.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Creating a function with the same name is called overloading. You can create as many functions as you want with the same name, as long as the parameters are not the same number.
Why do I mean by the same?
You can have two functions with the same number of parameters as long as at least one of them is of a different type than the other definion.
But this will not compile:
public void abc(int m)<br />
{<br />
}<br />
<br />
public int abc(int m)<br />
{<br />
}
because the return type is not part of the function signature. Only the name and the parameters are.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Nice expalnation.
Best Regards,
Apurva Kaushal
|
|
|
|