|
hi,
I am having three drop down lists
1.countires
2.states
3.cities
I filled my country dorpdownlist from the database.
And now i like to fill the states dropdown list when the country is
selected all the states of the corresponding countries must be filled.
Any one plz help me how i can do this....
Thanx in advance
|
|
|
|
|
There are a ton of examples on the web of how to do this. Given that all we can assume that you're not using ASP.NET ( that is, we have no idea what you're using ), it's hard to say much more.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
javascript might be the way forward:
Something along the lines of:
<script type="text/javascript">
function updateState(){
var country = document.getElementById('country').value;
if (country == "England"){
//add children here
}
}
</script>
<select id="country" onchange="updateState()">
<option value="England"> England<option>
...
</select>
<select id="state" onchange="updateState()">
</select>
|
|
|
|
|
You can use Ajax call to get values for state based on selected country
Jyoti
|
|
|
|
|
hello
How i retrieving Images from database sql server to ASP.NET page plz?
thank inadvance.
|
|
|
|
|
We have an ASP.NET section, we have articles that explain how to do this, and google has tons of info also. The basic answer is, write a web page which takes a database id and does a binary write back of an image, and point your image tags to that URL.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
|
|
|
Hi Friends,
I have used to implement to listed calendar events using Google Calendar API. This is API are read all calendar title from particular email accounts.But i cannt get calendar events.when i click calendar title it shows error message like "Events from one or more calendars could not be shown here because you do not have the permission to view them.".
How can i enable this permission through google APIs.
Thanks in advance.
Rameshkumar.T
|
|
|
|
|
Hi there,
I am very tired searching for a good web-hosting service, I am about to deploy my small business site but I am very confused about what service provider to choose. I am not after very cheapest sites, I am after performance and reliability with reasonable price.
My requirements are:
1. ASP .NET 2.0 hosting.
2. MS SQL Database with 500MB minimum
3. 5GB disk space.
4. about 350GB data transfer/month.
5. VERY reliable service.
6. Fast, I don't want my web pages to take long time to load.
7. Php and mysql enabled site.
Any site recommendations?
Thank you
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
You can have a look over this site
aplus.net
They are having different plans like Personal, Business, professional , e-Commerce .
Good luck !
Thank you!
|
|
|
|
|
Have a look at www.ComputingHost.com
they have good plans and after sales support.
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
Thanks for the reply, but I have a question:
what about VPS hosting, does this mean that it can have Windows hosting? I've never hosted any site so I am confused.
here is link, but it doesn't say there is Windows hosting :-/http://www.computinghost.com/vps_server_hosting/vps-hosting-information.html[^]
Thanks
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
Im afraid i dont know much about VPS hosting. but going through their site....i found it very expensive
You can have a look at this link
http://www.computinghost.com/windows_web_hosting_files/windows-hosting-information.html
Alternatively you can drop a mail to the support team of ComputingHost.com specifying your business needs and ask them whats the best plan for you? Then you can decide further on your own.
Also do cross check from other sites as well as there are huge differences in pricing across internet. It is really a confusing thing and you need to double check everything before going for any option anywhere.
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
Mohammad A Gdeisat wrote: searching for a good web-hosting service
If you are searching for a very good web hosting then look at
www.rackspace.com[^]
They provide a dedicated hosting and are quite expensive, but highly reliable.
Recently, rackspace have also started shared hosting, do visit this site
Regards
Aman Bhullar
www.arlivesupport.com[^]
|
|
|
|
|
Hi guys,
I’ve worked trying to solve this problem for several days, but, unfortunately I couldn’t.
Image this situation:
1. I have several Web Pages with several control labels.
2. Each label has a value that need to be updated each 5 seconds automatically. This new values will come from a database.
3. I’m trying to develop a WEB Page control to get the newest values from my database and after that update each label.
4. I’m a beginner programmer, so I was trying to do a simple control first. This control should create a scriptmanger, updated panel and timer programmatically and after that update this label with de system time.
5. Someone could help to solve this problem? I've worked hard at this problem for several days, but without success.
Thanks. Valmir
See my code below.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ServerControl
{
[DefaultProperty("Text")]
[ToolboxData("<{0}:ServerControl1 runat=server></{0}:ServerControl1>")]
public class ServerControl1 : WebControl
{
ScriptManager sm;
private UpdatePanel _updatePanel = null;
private Label _targetLabel = new Label();
private Timer _timer= new Timer();
AsyncPostBackTrigger _ap1 = new AsyncPostBackTrigger();
private Control _controlContainer = new Control();
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
//Se a página não tiver um scripmanager ira criar um novo
//If this page has no scriptmanger I will create one.
sm = ScriptManager.GetCurrent(this.Page);
if (sm == null)
{
sm = new ScriptManager();
base.Controls.AddAt(0, sm);
}
//Cria um label que será usado para receber a horário atual a cada um segundo.
// This label will be used to receive the system time each second.
_targetLabel.Text = "Teste";
_targetLabel.ID = "Paixao";
_controlContainer = _updatePanel.ContentTemplateContainer;
_controlContainer.Controls.Add(_targetLabel);
//Timer que ira atualizar o label que esta dentro do update panel. Será atualizado a cada 1 segundo.
//This is the timer will trigger the update panel each second.
_timer.Interval = 1000;
_timer.Tick += new EventHandler<EventArgs>(_timer_Tick);
_ap1.ControlID = _timer.ID;
_ap1.EventName = "Tick";
_updatePanel.Triggers.Add(_ap1);
//Adiciona o update panel a coleção de controles
//ADD the update panel to control collections.
base.Controls.Add(_updatePanel);
}
protected override void Render(HtmlTextWriter output)
{
base.Render(output);
}
private void _timer_Tick(object sender, EventArgs e)
{
_targetLabel.Text = System.DateTime.Now.ToString();
}
}
}
modified on Friday, June 5, 2009 12:32 PM
|
|
|
|
|
You will have more luck in the right forum ( ASP.NET )
valmirpaixao wrote: _timer.Interval = 1000;
_timer.Tick += new EventHandler<eventargs>(_timer_Tick);
Yes, it's plain you know nothing yet about ASP.NET, what it is, and what it does. This code will never, never work, because once a page is served, it ceases to exist on the server.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hello everyone,
My question is related to ASP classic, not ASP.Net, my question is -- whether it is good code to judge that, if a session variable is "" (Empty String), then I treat session as expired? Like this,
if session("timeToken") = "" then
thanks in advance,
George
|
|
|
|
|
Oh George, your questions are still as obscure as they've always been.
Whats to stop a programmer setting session["timeToken"] = ""? It doesnt necessarily mean the whole session is expired, just that that particular variable has been set to an empty string.
|
|
|
|
|
J4amieC wrote: Oh George, your questions are still as obscure as they've always been.
I'm hoping you didn't fall out of your chair.
|
|
|
|
|
Can't you just insert the code in the GLOBAL.ASA to handle whatever it is you are trying to do?
|
|
|
|
|
Hope someone can give me a hand.
Im creating a Crystal report in VS2008 C# using a strongly typed dataset using the following code;
ReportDocument MyReport = new ReportDocument();
MyReport.Load(Server.MapPath("~/MyReport.rpt"));
MyReport.SetDataSource(dt_CompareData);
CrystalReportViewer1.ReportSource = MyReport;
CrystalReportViewer1.RefreshReport();
but when I try to set the data source of the report it throws the following error.
'The call is ambiguous between the following methods or properties: 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Collections.IEnumerable)' and 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Data.DataTable)'
I've tried a few slightly different versions of the code all with the same result. I've also tried several 'tutorials' that walk you through the process step by step without luck.
Any help would be greatly appreciated.
Thanks in advance
|
|
|
|
|
I agree with the steps you use to invoke crystal, so the only thing left is to see how you defined "dt_CompareData" and populated it with values.
Show that code and maybe we can find the problem.
|
|
|
|
|
OK, here is the pertinent code. I have examined the datatable in debug mode and it looks to be populating just fine so I don't think that is the problem. I've also tried assigning the table to a dataset and setting the datasource to the dataset with the same result.
protected void Button1_Click(object sender, EventArgs e)
{
HeadCount_Controller controller = new HeadCount_Controller();
int Filter = System.Convert.ToInt32(RadioButtonList1.SelectedValue);
string DateFrom = txb_DateFrom.Text;
string DateTo = txb_DateTo.Text;
int TrafficTol = System.Convert.ToInt32(tb_TrafficTol.Text);
int TransTol = System.Convert.ToInt32(tb_TransTol.Text);
List<Chain> ChainList = new List<Chain>();
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cb = ((CheckBox)row.FindControl("cb_Select"));
if (cb != null && cb.Checked)
{
Chain me = new Chain();
me.Chain_Name = row.Cells[0].Text.ToString();
ChainList.Add(me);
}
}
HeadCountDataSet.DB_vs_App_CompareDataDataTable dt_CompareData = new HeadCountDataSet.DB_vs_App_CompareDataDataTable();
dt_CompareData = controller.CompareData(ChainList, DateFrom, DateTo, Filter);
ReportDocument MyReport = new ReportDocument();
MyReport.Load(Server.MapPath("~/MyReport.rpt"));
MyReport.SetDataSource(dt_CompareData);
CrystalReportViewer1.ReportSource = MyReport;
CrystalReportViewer1.RefreshReport();
}
From the Controller;
public HeadCountDataSet.DB_vs_App_CompareDataDataTable CompareData(List<Chain> ChainList, string DateFrom, string DateTo, int Filter)
{
HeadCountDataSet.DB_vs_App_CompareDataDataTable dt_CompareResults = new HeadCountDataSet.DB_vs_App_CompareDataDataTable();
foreach (Chain row in ChainList)
{
HeadCountDataSet.DB_vs_App_CompareDataDataTable dt_ChainData = new HeadCountDataSet.DB_vs_App_CompareDataDataTable();
dt_ChainData = HeadcountDB.CompareData(row.Chain_Name, DateFrom, DateTo, Filter);
foreach (HeadCountDataSet.DB_vs_App_CompareDataRow arow in dt_ChainData)
{
dt_CompareResults.ImportRow(arow);
}
}
return dt_CompareResults;
}
Thanks for any assistance.
|
|
|
|