|
Do you have a strongly typed dsorders dataset in your project?
|
|
|
|
|
yes i do.dsorders is an xsd schema.
|
|
|
|
|
if my website have 100 pages and i want that 25 aspx pages be displayed when he is logged in.How can i achieve this with web.config file?
Mohinder Singh
|
|
|
|
|
I'm not sure if I understand what your problem is....
---------------
http://serverside.no
|
|
|
|
|
Hi,
I have created a new virtual directory and my validation controls are not working. My virtual directory is H:\ABC and My project lies in H:\ABC\MyProject.
Where i have to add WebUIValidation.JS File. I tried putting in ABC folder as well as MyProject But still not working. Do i have to configure anything. My IIS has a separate site for this virtual directly. This does not lie in Default web site. Pleaes help me out.
Ramya
|
|
|
|
|
I would like to put ASP software on my server, but I have heard that it has security issues. is this true
|
|
|
|
|
What ASP software do you mean? Do you mean the IIS web server that supports ASP, or some application developed using ASP?
What kind of security issues are you talking about?
---
Year happy = new Year(2007);
|
|
|
|
|
IIS web server that supports ASP
|
|
|
|
|
You've 'heard' it has security issues ? Wow.
IIS without any patches on a machine with no firewall is probably not secure. Do you mean ASP, or ASP.NET ? Either way, doesn't matter too much, what is it you want to install, and why ? What security issues are you worried about ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Plain vanilla ASP on IIS 4.0 did have security threats from CodeRed and NIMDA. However, subsequent ServicePacks and patches from Microsoft have filled the gap sufficiently.
It is upto the web administrator to suitably firewall the webserver and apply enough judicious security precautions.
|
|
|
|
|
Hi guys,
I have a database in SQL Server and I wanted to create a web interface in C#. I have 3 Listbox controls and a Textbox and two buttons for this. What I want to do is to select values from 3 Listbox controls and input some text in the textbox i.e year to display information on another page including all the information from listboxes too. I have no idea how to program this part. I have populated the 3 Listboxes from the database tables and I want to select some values from these listboxes and display information on another page. Could somebody help me in this regard. Below is the code I developed so far.
protected void Page_Load(object sender, EventArgs e)
{
// create the connection string and command string
string connectionString = "Server=.\\SQLEXPRESS;Database=NorthWind;Integrated Security=SSPI;";
string commandString = "Select * from Customers";
string commandString1 = "Select * from Orders";
string commandString2 = "Select * from Employees";
//pass the strings to the sql data adapter constructor
SqlDataAdapter dataAdapter = new SqlDataAdapter(commandString, connectionString);
SqlDataAdapter dataAdapter1 = new SqlDataAdapter(commandString1, connectionString);
SqlDataAdapter dataAdapter2 = new SqlDataAdapter(commandString2, connectionString);
SqlDataAdapter dataAdapter3 = new SqlDataAdapter(commandString2, connectionString);
// create a data set
DataSet dataSet = new DataSet();
// fill the dataset object
dataAdapter.Fill(dataSet, "Customers");
dataAdapter1.Fill(dataSet, "Orders");
dataAdapter2.Fill(dataSet, "Employees");
dataAdapter3.Fill(dataSet, "Products");
// for loop for customer table
foreach (DataRow dtrow in dataSet.Tables["Customers"].Rows)
{
ListBoxCustomers.Items.Add(dtrow["CustomerID"].ToString());
ListBoxCustomers.Items.Add(dtrow["City"].ToString());
ListBoxCustomers.Items.Add(dtrow["CompanyName"].ToString());
ListBoxCustomers.Items.Add(dtrow["ContactName"].ToString());
}
// for loop for Employees table
foreach (DataRow dtrow in dataSet.Tables["Employees"].Rows)
{
ListBoxEmployees.Items.Add(dtrow["EmployeeID"].ToString());
ListBoxEmployees.Items.Add(dtrow["LastName"].ToString());
ListBoxEmployees.Items.Add(dtrow["FirstName"].ToString());
}
// for loop for order table
foreach (DataRow dtrow in dataSet.Tables["Orders"].Rows)
{
ListBoxOrders.Items.Add(dtrow["OrderID"].ToString());
ListBoxOrders.Items.Add(dtrow["CustomerID"].ToString());
ListBoxOrders.Items.Add(dtrow["EmployeeID"].ToString());
}
And here is the Event Handler which I want to select values from the listboxes and a textbox and redirect the user to display relevant information on another page. Unfortunately I don't know how to code this part.
protected void BtnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect("Default2.aspx"); // another page to display
}
I appreciate your help.
Koonda
|
|
|
|
|
This is the wrong way to do it. Use a datagrid or a grid view, and assign your datatable as a datasource to the control, then call databind. It will do this iterating for you.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks Christian Graus,
I just wanted to develop it in a programming way, but anyways the GridView is also a good idea so I will go ahead and use GridView.
Thanks
Koonda
|
|
|
|
|
koonda007 wrote:
I just wanted to develop it in a programming way,
You should always try to do stuff the *right* way, which usually means, the easiest way.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi, how can i open a new window (not same window!!) from an ImageButton using asp.net??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
target="_blank" in the button attributes. ASP.NET will ignore it, as it's not a server tag, and it will be passed through as is.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Dear All,
i am bit new to the dotnet world. i am making web application using asp.net ,C# (Visual studio 2005).
i want to how can i make page to reappear as page was loaded very first time after saving all the record(controls content) on save button.
i have page with seven controls (some of them autopostback). and there is save button. so i basically trying for as soon as save button complete its command, i clear all controls values. so as page reappear in its initial stag.
HOw can i do it . please help me
thanks
regards
imran khan
|
|
|
|
|
Hi imran khan,
The controls are they empty when you are loading the page first time?
If so, you can either after you have saved into data/xml-file in your save buttons click event set the controls value to an empty string as:
test.text = "";
or you can make a function where you make all the controls emty, an example:
private void emptyControls()
{
LabelTest.text = "";
TextTest2. = "";
}
Now call the function in the save buttons click:
emptyControls();
If you gets input to the controls in your page load, from a database/xml-file you have to do same in the save button click event. I here suggest that you make a function and then call it both places.
Kind regards,
simsen
|
|
|
|
|
Hey guys, I was wondering how do I change the settings of a webpage programatically if the page is using an external styles sheet (lets say styles.css).
If I would like to...lets say change the background color in the load event of the page or perhaps the button click event...right now I'm doing that in the html mode by assigning the value directly to the inline style element.
But I'll be creating external style sheets, and would like to grab the values from their programatically in code behind.
Can some one point me to the right direction??
Thanks
~TINA
|
|
|
|
|
In all WebControls you have the property CssClass.
You can set it dynamically in your server-side code.
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
include the style.css file into the aspx
and
private void Button1_Click(object sender, System.EventArgs e)
{
this.TextBox1.CssClass="myclass1";
}
It is cool
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
-- modified at 21:06 Sunday 14th January, 2007
|
|
|
|
|
Hi Guys
How i can add CLASS projects into my Solution Files. I am using VS 2005 Express. Evertime i can see only two options
a) Add new site
b) Add exisitng web site...
Please Advice.
Thx
|
|
|
|
|
File -> Add -> New project
---
Year happy = new Year(2007);
|
|
|
|
|
Nope
only two options for adding new or exisiting web site...Please suggest....
Is it not a feature from 2005 Express version?
|
|
|
|
|
The express editions are limited, yes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|