|
This is a good article and should help you:
http://www.c-sharpcorner.com/UploadFile/paulabraham/Building3TierAppPA11282005053625AM/Building3TierAppPA.aspx
We are not a Code Charity
|
|
|
|
|
Hello,
When ever I call the web method I get the below web method.
Message System.Web.Services.Protocols.SoapException: commandLine=OPSTMSTK Root=ProductStock EventReport=EventReport, Exception Message=SERVERNAME.Core.Connection: Read failed from remote server for header SERVERNAME:15101
at TEST.Core.ServiceHelper.WebServiceHelper.RaiseException(String webServiceNamespace, String errorMessage, String errorNumber, String errorSource, FaultCode code)
at TEST.Core.ServiceHelper.ServiceHelper.Run(String myXmlString)
at TEST.Core.ServiceHelper.ServiceHelper.RunTESTProgram(String TESTProgram)
at WSProductInfo.ProductStock.GetStatus(String ProductId, String Site)
The code is as below:
//Error code//
Applicaion.Accept.Order wsOrderAccept = new Applicaion.Accept.Order();
wsOrderAccept.getStatus()
//Error code//
If I write the below code twice (call web method 2 times), like if failed i.e throws an exception then go to catch and try again. In this case it works, strange!
Applicaion.Accept.Order wsOrderAccept = new Applicaion.Accept.Order();
try
{
wsOrderAccept.getStatus()
}
catch
{
wsOrderAccept.getStatus()
}
Any Idea....plz suggest some thing.
Regards,
Pavas
Regards,
Pavas
|
|
|
|
|
in one usercontrol i am using modalpopup,
to validate form i am using javascript, which is written in .js file.and
included from scriptmanager in masterpage.
now when i click on button,
javascript cannot get the control or can say clientid of control(e.g. textbox)
but this problem is in firefox only,it works perfet in ie.
anybody plz fix the problem.
thanks
VISHAL PAREKH
|
|
|
|
|
javascript could be disabled in firefox, check that first then post back
We are not a Code Charity
|
|
|
|
|
no it works in firefox,when i write alert("test")
it is displayed correct,but when i write
alert(b); where b is var of javascript assign to textbox control
then it displayed null
VISHAL PAREKH
|
|
|
|
|
Hello, I am using the calendar control and i want to save the selected date into my database. The problem occurs when i am trying to save a date, and the day i pick is >=13. The database saves dd/MM/yyyy, but the calendar is sending to the database a MM/dd/yyyy. I used the toString function, and the formats available, but nothing.
Thank you, a priori.
|
|
|
|
|
Now I could be wrong here but wont the database save it i a particuler format because it is set up to do so.
If that is the case just change the format of it when you retrive it from the database.
We are not a Code Charity
|
|
|
|
|
I am displaying query results in repeater control. now i want to click any row of repeater and get id of that row. is it possible through javascript. if yes then plz help through supportive text.
Thanx a lot
|
|
|
|
|
Hi,
Let’s say you are going to click on a button placed in the repeater. And I assume that there is a field that you want to get the ID of. So here I will assume it to be ‘CustomerID’. Duing item bound this customer ID will be assigned as the CommandArgument of the button that you will be clicking.
Sample - Code
<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
<ItemTemplate>
<br />
<asp:Label ID="lblCustomerName" Text='<%#Eval("CustomerName") %>' runat="server"
Width="100px"></asp:Label>
<asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" CommandArgument='<%#Eval("CustomerID") %>' />
</ItemTemplate>
</asp:Repeater>
In the ItemDataBound event of the Repeater, access the button, and get the commandargument, which will be the ID you want and here, I’m calling an alert to return the ID.
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
Button btnEdit = (Button)e.Item.FindControl("btnEdit");
if (btnEdit != null)
{
string sId = "The selected item ID:" + btnEdit.CommandArgument.ToString();
btnEdit.Attributes.Add("onclick", "javascript:return " +
"alert('" + sId + "')");
}
}
Hope it’s clear.
Thx,
Gayani
|
|
|
|
|
Thanx Gayani Sir.
This second of my questions that u have helped me out. Thanx a ton.
|
|
|
|
|
i implimented this but there is a problem that id it gets is the id of last row only.
|
|
|
|
|
Hi,
You are most welcome.
Can u pls copy that code(.aspx and .cs files), so that I can find out where the error is.
Here is a another way of testing whether it returns ID correctly.
Just add the following code to your repeater and check.
<asp:Label ID="lblDisplayIDs" Text='<%#Eval("CustomerID") %>' runat="server"></asp:Label>
For verification.
Thx,
Gayani
modified on Friday, June 6, 2008 4:37 AM
|
|
|
|
|
Here is code given below
.aspx File:-
<table width="556px" cellpadding="0" cellspacing="0" rules="all" border="1" bordercolor="gray" >
<asp:Repeater ID="rpt_Details" runat="server" OnItemDataBound="rpt_Details_ItemDataBound">
<HeaderTemplate>
<tr>
<th align="center" width="67px">
ProductID</th>
<th align="center" width="190px">
ProductName</th>
<th align="center" width="70px">
SupplierID</th>
<th align="center" width="75px">
CategoryID</th>
<th align="center" width="127px">
QuantityPerUnit</th>
<th align="center" width="127px">
Get ID</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%#Eval("ProductID")%>
</td>
<td>
<%#Eval("ProductName")%>
</td>
<td>
<%#Eval("SupplierID")%>
</td>
<td>
<%#Eval("CategoryID")%>
</td>
<td>
<%#Eval("QuantityPerUnit")%>
</td>
<td>
<asp:Button ID="btn_GetID" runat="server" Text="GetID" CommandName="Edit" CommandArgument='<%#Eval("ProductID") %>' />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
.cs File:
protected void rpt_Details_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
Button btnedt = (Button)e.Item.FindControl("btn_GetID");
if (btnedt != null)
{
int id = Convert.ToInt32(btnedt.CommandArgument);
Label2.Text = id.ToString();
}
}
|
|
|
|
|
Hi,
Okay, I understand your problem.
First, the event ItemDataBound fires every time you bind an item to the grid view, there for as a result your label’s text will be assigned by the last ID. You can use this to bind the JavaScript functionality. I think in this scenario that is to get the ID in to a label try this code.
Sample Code.
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
Button btnEdit = (Button)e.Item.FindControl("btnEdit");
if(btnEdit != null)
{
if (btnEdit.CommandName == "Edit")
{
Label1.Text = btnEdit.CommandArgument;
}
}
}
ItemCommand event will basically fire when you click on any button in your repeater control. I.e. either you click on edit or delete, so to identify which button you click distinctly I have marked the button’s command argument as edit, so you know you what to get the ID when you click on edit only. And assign it to the label.
Note: Make sure you are binding to the repeater when IsPostBack is false.
Thx,
Gayani
modified on Friday, June 6, 2008 8:09 AM
|
|
|
|
|
hello friends
I want to autoredirect the user when the payment is sucessfull
i have given a success return value so on button click it is getting redirected
Please tell me is there in any option for auto redirecting if yes a link or small code will be useful to me
One more question :
I am sending mail to the person who has paid thru paypal
so before redirecting to paypal i am storing the email message in a session variable and in the page load event of thank you page (sucess page ) i am sending the messages and setting a text in the label that payment is done sucessfully and docket number is """.. unfortunately this is not working
Is session getting expired or what ? most of the times the label text is remaining the default text
regards
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
What you can do is at the time of payment create one table which will store that user id and whatever other fields you want to store .Then after this paypal is successfully returning in code,it will give somthing 1 or 0 as a return value .By comparing that one you can redirect it to whichever page you want and the second thing is mail so you can store that email as well in that table and after fetching it you send appropriate message to him that your payment is done and all that..
Regards,
Bhumika Barot
Thanks & Regards,
Bhumika Barot
|
|
|
|
|
As soon as you user leave your page to paypal ur session is gone.You can save the email into cookie.Hope that help
|
|
|
|
|
Hi ! Friend
I have get response in xmldocument. i want to fill xml in table or gridview. so please help me how can i fill xml in htmltable by vb.net code.
harun
|
|
|
|
|
I have a file upload control (to save the files in a folder).After selecting a document file with the size of 15 Mega Byte ,When i click the button to save it in a folder , it navigates to Cannot find server page .The page cannot be displayed.
I think this control has got file length restrictions.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Check that the folder you are uploading the file to has the correct address, if it is check that 15mb can be remotly added to your server
We are not a Code Charity
|
|
|
|
|
it is working very fine if the size is 1-4 mb.
Let me tell u the complete situation,
there is a button and a file upload control.
now select a file with the size of 15 mb , and click the button , u will bet the error.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Hi Pankaj,
When you upload a large file your request size should support it. Therefore I think you need to increase the size of the MaxRequestLength in your web.config to support this.
Add or Change this tag in your web.config, in the <httpRuntime> section. This is specified in KB.
<httpRuntime maxRequestLength="15360"/>
But, the maximum would be 100MB.
Thx,
Gayani
modified on Friday, June 6, 2008 9:13 AM
|
|
|
|
|
hello frnds,
i have create wesite to send email and do the code using CDO but when i run the code, it gives me message "Transfer failed to connect the server"
Then i tried with System.Net.Mail but it give sme message that "XXXX is not valid in current context:25"
what i can do ?? how to solve these error
what it mean ???
how can i clear it ???
thankx in advance
Koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
It sounds like your connection string is incorrect, maybe you should try testing the connection in the design view of visual studio?
Double check you have the correct information
We are not a Code Charity
|
|
|
|
|
Hi all
I am using AutocompleteExtender with TextBox ,the autopostback property of the textbox is true and there is some event on textchange event,The Autocomplete extender show the scrollbar.
The problem is when i drag the scrollBar the Text TextChanged event is call means it postback,help me
Thanks
|
|
|
|