|
I have only the wsdl file not the web service. My application is a windows service and I need to create the proxy class in order to call the webservice. I don't have the site for the webservice.
Please help
|
|
|
|
|
gerom77 wrote: I have only the wsdl file not the web service. My application is a windows service and I need to create the proxy class in order to call the webservice. I don't have the site for the webservice.
You don't need to have a site for webservice for generating proxy classes. You can add web reference of WSDL file from local disk too like c:\consumer.wsdl as an URL while adding a web reference.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
hi there,
i got following error when downloading ZIP file having size 4GB
the error says
The size parameter must be between zero and the maximum Int32 value.
Parameter name: size
Actual value was 2166897372.
i have used following code
code]
Response.ContentType = "application/zip";
Response.AppendHeader("Content-Disposition","attachment; filename=SailBig.zip");
Response.TransmitFile( Server.MapPath("~/images/sailbig.zip") );
Response.End();
[/code]
what should i do ???
thanks in advance
koolprasad2003
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: i got following error when downloading ZIP file having size 4GB
the error says
Have you configured in your Web.Config to deal with such size of response?
Look here: http://msdn.microsoft.com/en-us/library/e1f13641.aspx[^]
Set appropriate MaxRequestLength attribute and try.
|
|
|
|
|
Hi Friends,
I need to save an arabic data into sql server using dataset.The Arabic data will be enteered correctly but it will be saved using a dataset.In Dataset the Arabic data willnot display correctly.It displays like ??.How can i solve the issue.I need to save the data in arabic format.But the data will be added into the dataset like ??.Please help me to overcome this issue.
|
|
|
|
|
Install Arabic MUI(localization pack) and then change your system to Arabic locale. You should be able to see the data in Arabic.
|
|
|
|
|
hi every1,
I am developing code in MVC project. I craeted a class in Model and define related function. the problem is I don't know what I have to write in Controller part.
this is my program
its my class:item.cs
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace MvcApplication1.Models.Repository.DTO
{
public class Item
{
public int _id;
public int _code;
public string _description;
public string _creator;
public DateTime _created;
public int Id
{
set
{
_id = value;
if (value < 0)
throw new ArgumentException(string.Format("Id should be greater than 0 !"));
}
get { return _id; }
}
public int Code
{
set { _code = value; }
get { return _code; }
}
public string Description
{
set { _description = value; }
get { return _description; }
}
public string Creator
{
set { _creator = value; }
get { return _creator; }
}
public DateTime Created
{
set { _created = value; }
get { return _created; }
}
public Item(int id, int code, string description, string creator, DateTime created)
{
this._id = id;
this._code = code;
this._description = description;
this._creator = creator;
this._created = created;
}
}
}
then in Model part in another class I write:
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using MvcApplication1.Models.Repository.DTO;
namespace MvcApplication1.Repository
{
public class ItemRepository
{
private const string datasource =
"Data Source= Dell\\SQLEXPRESS;Initial Catalog=DB_Furniture.mdf;Integrated Security=True;User Instance=True";
private SqlConnection _connection;
private SqlCommand _sqlcommand;
private SqlDataReader _datareader;
public ItemRepository()
{
_connection = new SqlConnection(datasource);
}
public void Insert(string code, string description, DateTime created, string creator)
{
_sqlcommand = new SqlCommand("Ins_item",_connection);
_sqlcommand.CommandType = CommandType.StoredProcedure;
_sqlcommand.Parameters.AddWithValue("@Code", code);
_sqlcommand.Parameters.AddWithValue("@Description", description);
_sqlcommand.Parameters.AddWithValue("@Created", created);
_sqlcommand.Parameters.AddWithValue("@Creator", creator);
_datareader = _sqlcommand.ExecuteReader();
}
}
}
the problem is here. I don't know what should I write in Controller part
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using MvcApplication1.Models.Repository.DTO;
using MvcApplication1.Models.Repository;
using MvcApplication1.Repository;
namespace MvcApplication1.Controllers
{
public class FurnitureController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Create()
{
return View();
}
public ActionResult Craete(Item item)
{
try
{
ItemRepository ItemRep = new ItemRepository();
??????????????????????????????????????????????????????????????????????????????????
?
??
}
catch
{
}
}
}
}
Plaese help me what I have to write here. give me some code.
thxxxxxxxx
modified on Tuesday, June 29, 2010 11:19 AM
|
|
|
|
|
Code part is supposed to be in PRE block and not the text. It's not readable otherwise. Please format it such that one can look at it and reply back.
|
|
|
|
|
I edit the code. could u please check it now?thxxx
|
|
|
|
|
Please helppppppppppppppppppppp
|
|
|
|
|
I have applied this format {0:c} which shows a negative number like this ($23.43)....i want to show negative numbers in square brackets. How to achieve that?
|
|
|
|
|
Civic06 wrote: .i want to show negative numbers in square brackets.
It's not the *standard* way to show negative numbers. using round brackets '()' is the standard way to show negative number and thus the implementation.
If you want to show it in square bracket '[]' then you need to write your own custom formatter. You cannot change this in existing format rules.
|
|
|
|
|
Hi All,
I have a Rad ListBox, and a button for save, when user check or unchecks any item in the list box. The save button should be enabled. Other wise it is disabled. Can anybody help me in doing this either using Java script or Code behind. Anything is ok.
Any link or any code snippet is very much helpfull.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
on page load you may try like
saveBtn.Enabled=false;
Build a javascript function such that it gets enabled when a user clicked on the listbox.
like
document.form1.getElement("mylistbox1").checked
document.form1.getElement("saveBtn").enabled=true;
|
|
|
|
|
I am wondering if any one of have experience a url that contains a folder name with an "&" or amperand sign in it and getting the "Bad Request" message through an IE.
I have a folder name like A&R. I have even tried encoding the url but there was no success. I know amperand is an especial character in a url but is there any solution to this problem in iis7.0?
kindly let me know thanks in advance.
|
|
|
|
|
When you say you are encoding them, is that a UrlEncode? Are they converting to %26?
|
|
|
|
|
yes, that's right it convert to %26 but path couldn't be accessed
such as ../../A&R/data.txt
|
|
|
|
|
netJP12L wrote: yes, that's right it convert to %26 but path couldn't be accessed
such as ../../A&R/data.txt
If URL is encoded correctly then it should look like ../../A%26R/data.txt
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have a inventory application that pulls data from our database.
So on a page called loggedin.aspx I have two drop down list on the left and a DATALIST (with a pageddatasource) on the right. Now the two boxes on the left let you choose the CITY and the YEAR for the inventory.
Once you select both drop a drop down and click GO it sets the session variables:
protected void btnGo_Click(object sender, ImageClickEventArgs e)
{
if (ddlJUR.SelectedIndex != -1)
Session["JUR"] = ddlJUR.Items[ddlJUR.SelectedIndex].Text;
if (ddlFY.SelectedIndex != -1)
Session["FY"] = ddlFY.Items[ddlFY.SelectedIndex].Text;
}
Now on page load it should be pulling data from the database based on those values. It should also be setting a label stating which values you ahve chosen and also selecting the correct jurisdiction/ fiscal year from the drop down box:
protected object FY;
protected object JUR;
FY = Session["FY"];
JUR = Session["JUR"];
if (JUR == null)
lbBreadCrumb.Text = "Please select the jurisdiction from the left.";
else if (FY == null)
{
ListItem iJUR = ddlJUR.Items.FindByText(JUR.ToString());
if (iJUR != null)
ddlJUR.SelectedIndex = ddlJUR.Items.IndexOf(iJUR);
lbBreadCrumb.Text = JUR.ToString() + " > " + "-Please select the Fiscal Year from the left-";
}
else
{
lbBreadCrumb.Text = JUR.ToString() + " > " + FY.ToString();
ListItem iJUR = ddlJUR.Items.FindByText(JUR.ToString());
if (iJUR != null)
ddlJUR.SelectedIndex = ddlJUR.Items.IndexOf(iJUR);
ListItem iFY = ddlFY.Items.FindByText(FY.ToString());
if (iFY != null)
ddlFY.SelectedIndex = ddlFY.Items.IndexOf(iFY);
if (!IsPostBack)
{
BindData();
}
}
It doesn't seem to work though. You have to click the go button twice. Iti s like the session variable doesnt set before the postback happens and the page is loaded??
|
|
|
|
|
Load happens before click. You click code will have to do some work to get the expected results. Ie, your code in page load needs to be in a place where your click can call it too.
|
|
|
|
|
Ahhh... ok...
Well for what I am tryign to do is Session the best result? I don't know much about ViewState but I'm reading more on it. Is there something else I should be doing?
|
|
|
|
|
Uhm I thought I knew what you meant but I guess not. Do yuo happen to have an example on a situation like this? I pretty much have to get those session variables on page load so I can query the database and show the data. But then they must also need to be able to change that information from the drop down list
|
|
|
|
|
You can never get the data on page load the first time around if this is the same page where the data is assigned. Try this some combination of the below:
protected void mBtnAssignWhatever_Click(object sender, EventArgs e){
...Assign Session Variables
PopulateForm();
}
protected void PageLoad(...){
LoadDataFromDatabase();
if(!IsPostBack){
}
PopulateForm();
}
private void PopulateForm(){
if(AreMySessionVariablesAvaiable()){
...
}
else{
...
}
}
|
|
|
|
|
Ok I see where you are going with this.
I may not be able to do what I need. Because I need to load the data from the database BASED on the session variables. ("SELECT * FROM Blah WHERE FY=<session variable=""> AND JUR=<session variable="">").
Your example above loads from the database first. I would think of pulling all the data and then filtering based on the session variables but that is a TON of data to pull.
Can you think of anything other than session variables to use? I was using QueryStrings but didn't really want to go back to that. I might have to though.
|
|
|
|
|
Try the following in your Data load event:
if(SessionDataIsLoaded()){
LoadData(sessionValue, ...);
}
else{
LoadData(defaultValue, ...);
}
|
|
|
|