|
If you are okay with delayed tick data then there are more options for you. You could use one of the free web services to get the data. Some of these are:
http://www.xignite.com/xquotes.asmx?op=GetQuote
http://www.extensio.com/websrv
http://www.swanandmokashi.com/HomePage/WebServices/
http://www.webservicex.net/stockquote.asmx
http://www.gama-system.com/webservices
http://www.serviceobjects.com/products/dots_fastquote.asp?zut=XMS1007
http://glkev.webs.innerhost.com/
http://www.xmethods.com/ve2/ViewListing.po?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE"
Yahoo also has RSS feed for Financial information. You can call http://finance.yahoo.com/q?s=msft and then parse the result.
I didn't read the terms and conditions for any of these so be sure to check them out.
|
|
|
|
|
How to download multiple files in single HttpResponse..
like Save attachment option in outlook.
Regards
Radhakrishnan G.
|
|
|
|
|
That is not possible. You can only send one file in each response.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
as Guffa said you cannot send multiple files in single response.
if you want bit complex solution then, you can add a "Download All" link, and when user click on it. you can zip all the files on the server for that mail and send the .zip file to user.
Yahoo Mail is doing the same way.
|
|
|
|
|
my string is
strCmd = strCmd & " and (StartDate>='" & CldStartDate.SelectedDate.Date & "' and EndDate<='" & CldEndDate.SelectedDate.Date & "')"
but i save my date time 17-12-2009 00:00:00 this format it give error not convesion in date time properly
|
|
|
|
|
Try using
convert(datetime,Convert(varchar(20),startdate, 101),101) >
convert(datetime,Convert(varchar(20),CldStartDate.SelectedDate.Date.ToString("MM/dd/yyyy"), 101),101)
|
|
|
|
|
Hi,
I am create a custom server control. This control contains panel , check box list.check box list is reside in panel. While mouse getting out of the panel selected Items of check box list must display as alert. I tried this as follows,
In WebCustomControl1.cs,
private Panel _panel;
private CheckBoxList _chkList;
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
protected override void CreateChildControls()
{
string strItems;
string[] StrArrItem = null;
char cSplitChar = ',';
int intLegth = 0;
_panel = new Panel();
_chkList = new CheckBoxList();
_panel.ID = "Panel1";
_chkList.ID = "DDList";
_chkList.BorderColor = Color.White;
_chkList.BorderStyle = BorderStyle.Solid;
_chkList.Width = Unit.Percentage(100);
strItems = AddItem;
StrArrItem = strItems.Split(cSplitChar);
intLegth = StrArrItem.Length;
for (int i = 1; i < intLegth; i++)
{
_chkList.Items.Add(StrArrItem[i]);
}
_panel.Controls.Add(_chkList);
this.Controls.Add(_panel);
}
protected override void Render(HtmlTextWriter writer)
{
CreateCtrlLeave();
_panel.Attributes.Add("onmouseout", "CtrlLeave(); ");
_panel.RenderControl(writer);
}
public string AddItem
{
get
{
if (ViewState["Text"] != null)
{
_strAddItem = (String)ViewState["Text"];
if (_strAddItem.Length > 0)
{
_strAddItem = _strAddItem.Length > 0 ? _strAddItem.Substring(0, _strAddItem.Length - 1) : _strAddItem;
}
return ((_strAddItem == null) ? String.Empty : _strAddItem);
}
return ((_strAddItem == null) ? String.Empty : _strAddItem);
}
set
{
ViewState["Text"] = null;
_strAddItem += value + ",";
ViewState["Text"] = _strAddItem;
//ViewState["Text"] = value+",";
}
}
public void CreateCtrlLeave()
{
StringBuilder str = new StringBuilder();
str.Append("\n");
str.Append("function CheckItem(panel)\n");
str.Append("{\n");
str.Append("var chkList = panel.getElementsByTagName(\"input\"); \n");
str.Append("for(var i=0;i<chklist.length;i++)\n");>
str.Append("if(chkList[i].type==\"checkbox\" && chkList[i].checked)\n");
str.Append("{\n");
str.Append("alert(chkList[i].type)\n");
str.Append("}\n");
str.Append("}\n");
str.Append("");
if (!Page.IsClientScriptBlockRegistered("clients"))
{
Page.RegisterClientScriptBlock("clients", str.ToString());
}
}
After all i created 2 custom controls on my web page. But at runtime one error is getting like,Object expected.
Can anyone help me to solve this problem? please
Anu
|
|
|
|
|
Your code is looking for a client function called CtrlLeave, but i don't see that being created anywhere...
|
|
|
|
|
Dear All,
I am working on a website i have to use one third party control WYSIWYG Text editor which i have downloaded FCKeditor.
But problem is this how i add this in my solution explorer and how i can make use of it please tell me its really big issues for me.
Thanks in advance.
|
|
|
|
|
These tend to be all a little different how they get deployed. You will at least need to add the reference to the DLL. The editor probably has some GUI (pages or images and such) that go with it. These are probably in a folder somewhere. You should create a virtual directory to that folder under your applications folder.
|
|
|
|
|
|
Thank you for answering to all my previous queries. All were very helpful. Now I'm facing another issue.
In my form I'm dynamically generating two dropdownlist controls. One is for country and other is for state. I can able to fire the SelectedIndexchanged event of Country dropdown and getting the id of Selected Index.
However, while selecting the control from Repeater control, eventhough FindControl Method is getting reference, the correponding dropdownlist is getting the null reference. Any idea what's happening?
Following is the code:
DropDownList CountryDropDownList = sender as DropDownList;
string controlName = string.Empty;
string ChkDropDown = CountryDropDownList.ID;
if (ChkDropDown.Contains("Country"))
{
int CountryId = Convert.ToInt32(CountryDropDownList.SelectedValue);
dt1 = Codtls.GetStatesList(CountryId);
foreach (UserField userField in _userFields)
{
if (userField.Name.Contains("State"))
{
string vaulueControlName = String.Concat("UserFieldValue", userField.Id);
controlName = String.Concat("UserField", userField.Id + "_" + userField.Name.ToString().Trim());
Control valueControl = UserFieldRepeater.FindControl(controlName);
DropDownList StateList = valueControl as DropDownList;
StateList.DataSource = dt1;
StateList.DataTextField = "_Statename";
StateList.DataValueField = "_StateId";
StateList.DataBind();
}
I tried to put the line, DropDownList StateList = (DropDownList)valueControl; then it is giving me the error ' Cannot cast repeater item to a dropdownlist'. Anybody can provide any help please?
Thanks in advance.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
public void ValidateBtn_OnClick(object sender, EventArgs e)
{
// How to get the value for each generated dynamic Textbox ?
}
public void BindRelatedProductsGrid()
{
SqlConnection Conn = SqlServer.GetConnection("test");
SqlCommand Command = new SqlCommand("select * from Related_Product_Types", Conn);
Command.Connection.Open();
SqlDataReader dr = Command.ExecuteReader(CommandBehavior.CloseConnection);
TableRow r1 = new TableRow();
TableRow r2 = new TableRow();
TableRow r3 = new TableRow();
TableCell c1 = new TableCell();
TableCell c2 = new TableCell();
TableCell c3 = new TableCell();
int counter = 1;
while (dr.Read())
{
// ADDS FIRST ROW (LABELS)
c1 = new TableCell();
c1.Text = dr["relatedtype"].ToString();
r1.Cells.Add(c1);
// ADDS SECOND ROW (GRIDVIEW)
//Creates GridView instances
c2 = new TableCell();
c2.VerticalAlign = VerticalAlign.Top;
GridView g = new GridView();
g.ID = "GridViewRelatedProducts" + counter;
g.AllowPaging = true;
g.AllowSorting = true;
g.AutoGenerateColumns = false;
string sql = "SELECT relateditems_uid, relatedproduct_uid, item_sku, product_uid FROM Related_Products_Items WHERE relatedproduct_uid = " + dr["relatedproduct_uid"].ToString() + "and product_uid= " + Session["product_uid"].ToString();
g.DataSource = GetDataSource(sql);
//g.DataSourceID ="SqlDataSource2";
g.EmptyDataText = "There are no data records to display.";
g.SkinID = "GridViewStandard";
g.AllowSorting = true;
BoundField bf1 = new BoundField();
bf1.DataField = "relateditems_uid";
bf1.SortExpression = "relateditems_uid";
g.Columns.Add(bf1);
BoundField bf2 = new BoundField();
bf2.DataField = "item_sku";
g.Columns.Add(bf2);
c2.Controls.Add(g);
r2.Cells.Add(c2);
// ADDS THIRD ROW (BUTTON AND TEXTBOX)
c3 = new TableCell();
//Adds textbox control
TextBox t = new TextBox();
t.SkinID = "StandardTextBox";
t.ID = "TextboxSKU" + counter.ToString();
t.Width = 70;
c3.Controls.Add(t);
//Adds literal control
Literal l = new Literal();
l.Text = "<br>";
c3.Controls.Add(l);
//Adds button control
Button b = new Button();
b.Text = "Add Item";
b.Click += new EventHandler(ValidateBtn_OnClick);
b.SkinID = "StandardButton";
c3.Controls.Add(b);
r3.Cells.Add(c3);
g.DataBind();
counter++;
}
TblRelatedProducts.Rows.Add(r1);
TblRelatedProducts.Rows.Add(r2);
TblRelatedProducts.Rows.Add(r3);
dr.Close();
Conn.Close();
}
|
|
|
|
|
You might have to go old school and get it out of the response.form collection. Or you could set the onkeyup of the textbox to call some script which will write the contents of the textbox into a server hidden control. That you can get from the viewstate.
|
|
|
|
|
How can I detect a continous mouse down state? I need to auto-increment a numeric text field as long as the mouse is held down over an up botton and decrement for a down bottom. As soon as the mouse is up, the process stops. I believe I probably need to two frames, when the mouse is pressed, the head moves to the second frame which detects whether the mouse is down. If it is, increment a numeric variable, display the variable, then send the head back to the first frame that repeats the process of the second frame. I can increment the numeric variable and display it but I am not sure how to detect a continous mouse state.
a
modified on Thursday, January 29, 2009 5:57 AM
|
|
|
|
|
try setting a javascript timer. The timer would start on mousedown and then fire a function to see if the mouse is till down and increment your value.
|
|
|
|
|
how to convert awebsite from two tier archtecture to three tier archtecture
|
|
|
|
|
Hi,
which two tiers do you have? What is your target architectute (Presentation layer, Logic layer, DataAccess Layer)?
I think you have to refactor. There are some hints about this (e.g. books from Martin Fowler) but no general task list like 1. do this, 2. do that ... N. Now you have a three tier application.
Regards
Sebastian
|
|
|
|
|
give me a small example any like a single page.how to store data in database in three tier architecture on button click from textboxes
|
|
|
|
|
|
|
|
Hi All,
How to refresh the Datagrid(WPF DataGrid) for every 5 minutes in WPF Browser application,
Thanks
Hari
|
|
|
|
|
I have databound controls, from which I'd like to retrieve the value selected by the user.
System.Web.UI.WebControls.DropdownList
System.Web.UI.WebControls.GridView
cmdCreateNewTaskQuery.Parameters.AddWithValue("@sub_category", lstTaskSubCategory.SelectedValue.ToString());
cmdCreateNewTaskQuery.Parameters.AddWithValue("@priority", lstPriority.SelectedValue.ToString());
cmdCreateNewTaskQuery.Parameters.AddWithValue("@product", "1");
I also tried converting the values to (Int64) but it is not possible to explicitly convert strings.
(Int64) lstTaskSubCategory.SelectedValue.ToString
.NET Framework 2.0
Any ideas?
Jon
|
|
|
|
|
Hi,
do get an int from a string you have to use int.Parse(). (Better you int.TryParse because of the performance). Did you put int-values in the DropDownLists? Then just try to add with mylist.SelectedValue... (if you debug your code, you can watch the type of the selectedValue, this let you know if the type is correct).
Regards
Sebastian
|
|
|
|