|
public void PrintControls(ControlCollection controls)
{
foreach (Control control in controls)
{
try
{
Debug("Control: " + control.ID.ToString());
}
catch
{
}
PrintControls(control.Controls);
}
}
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
BindDataGrid();
PrintControls(Page.Controls);
}
}
Todd Smith
|
|
|
|
|
Hi,
I've got a nice and heavy form that I need to validate before saving data to my database.
So I've decided to add some requierdFieldValidator on my form and one ValidatorSummary to regroup error message.
1st problem : When I leave a textBox, the associate requierdFieldValidator is fired.
2nd problem : the ValidatorSummary isn't used. It's always empty.
I've made a new form from crash and jsut put one TextBox, one requierdFieldValodator, one ValidatorSummary and one button and it's working fine.... only when I push the button.
I've compare all compenents between my form and my dummy form and it's exactly the same value
Can someone know what I can do before throwing the computer by the window ?
Thanx
Sybux
|
|
|
|
|
on what event do you call the requierdFieldValidator? should it be in the form's OnSubmit?
...
better still, can you show us a snippet of your code?
|
|
|
|
|
I just want my validator to be activated like all other exemple I've seen : when I fired a button.
I can't realy give you source code because I don't know where the problem is and the form code is some huge.
|
|
|
|
|
I'm using
window.open("http://www.jvf.co.uk", "image", "resizeable=yes"); This opens a new browser window without any toolbar etc. I want it to be resizable.
This code does it all appart from making it resizeable. Anyone got any ideas why please? I'm using IE6 but want it compatable across as many versions etc as possible.. Thanks
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org
|
|
|
|
|
window.open("http://www.jvf.co.uk", "image", "resizable=yes"); Spelling mistake!! Doh! I thought I was going crazy....
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Hi All,
Does ASP.NET still support SSI's?
If so how do I do it?
My other question is in regard to Controls.
I have a control called 'navigation.ascx' which holds all my navigation buttons for my application.
I place this control below every page.
What I am trying to do is when the client clicks on Button1 I populate the database with all the data from Page1.
But I can't seem to figure out how to pass data to a control dynamically.
Is this possible?
Thanks,
Gavin
|
|
|
|
|
good question - I was also going to ask this one today - anyone?
Shaun
|
|
|
|
|
|
How would Session Variables work?
Example:
I have a .aspx page with 1 text box on it called textbox1
After this control I have a control called button.ascx
When I load this page I click on the button which is in the control and I want it to redirect me to the URL that I have typed in textbox1 but I can't seem to access textbox1 from button.ascx
How would I do this?
Thanks,
Gavin
|
|
|
|
|
assuming the textbox and button control are on the same page then (PS - I just worked this out myself [yesterday I discovered the Application/Session objects])
I made the textbox on the page public rather than protected
then in my handler for the button I did this
private void Button1_Click(object sender, System.EventArgs e)
{
WebForm1 page = (WebForm1)Page;
Response.Redirect(page.TextBox1.Text,true);
}
I know it could be done better but I am just learning
Holy Handgrenade of Antioch instructions
|
|
|
|
|
Perfect, now I can redesign my entire site.... hmm maybe not the best idea..
Good to know for the future though
Thanks,
Gavin
|
|
|
|
|
|
I set mine up by either placing them inside a HTML table or by using the style tag.
HTH
|
|
|
|
|
|
What limitations exist for an ASP.NET webapplication as ragards a straight C# application.
I am trying to learn C# but I also need to know more about ASP.NET and since I can do the server side stuff in C# I thought I could combine the two tasks.
however I suspect that the c# in webapplications would be limited in someway - maybe not - but I'd like to know before I start racking my head over something I can't do
Shaun
|
|
|
|
|
What limitations exist for an ASP.NET webapplication as ragards a straight C# application.
I am trying to learn C# but I also need to know more about ASP.NET and since I can do the server side stuff in C# I thought I could combine the two tasks.
however I suspect that the c# in webapplications would be limited in someway - maybe not - but I'd like to know before I start racking my head over something I can't do
Shaun
|
|
|
|
|
I am trying to deploy an ASP.Net project from my 2000 Pro box to my XP Pro box using the copy feature of VS.Net. I have successfully moved it to a 2000 Advanced server box. The problem is that when I try and move it to the XP box I am getting permission errors.
Now I have tried opening up the anonoymous access, logging on as Admin, etc and every conceivable thing I can think of with no luck. .Net simply refuses to allow me to copy the ASP.net app to this IIS server.
I have also verified that the 2000 Advanced server has the identical IIS settings as the XP box except for those settings that Advanced server provides which are not on the XP Pro version of IIS such as Operators.
Any thoughts as to why this is causing me such grief and how to fix it would be greatly appreciated
|
|
|
|
|
Have you tried making a 1 page ASP.NET project and seeing if you still get the same errors?
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
Actually the test case I am trying is a single ASPX file. It works if I pull the data to the server as opposed to puching it from my development box. Unfortunately I wouln't always have that luxury if I need to push to a third party host.
|
|
|
|
|
I have a datagrid with a lot of columns that I need to creat a sql update statement from. Most of the examples do something like the following:
TextBox hours = (TextBox)objArgs.Item.FindControl("hours");
TextBox days = (TextBox)objArgs.Item.FindControl("days");
TextBox userid = (TextBox)objArgs.Item.FindControl("userid");
.... repeat for all controls in the grid
string sql = "update userinfo set hours = " + hours.Text + ", days = " + days.Text + " where userid = " + userid.Text;
As you can imagine this take a lot of code for a table with a lot of columns.
Is there a way to enumerate the bound columns of a datagrid? Something like:
string sql = "update userinfo set ";
foreach (BoundColumn column in myDataGrid)
{
sql += column.Name + " = " + column.Text ", ";
}
would be really nice.
Todd Smith
|
|
|
|
|
I believe you need to do it this way.
private void OnUpdate(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
TextBox text = (TextBox)e.Item.FindControl("Edit1");
Label label = (Label)e.Item.FindControl("Label1");
}
|
|
|
|
|
Hi all,
I have one iframe element on my aspx page. I want to pass the content of the
iframe back to the
codebehind file for saving to the database. Is there any way to grab this
information and post back?
Peter Marino
IO Interactive
|
|
|
|
|
Like subject says... I have problems when including a file more than once,
so having something like a #define would avoid including a file twice.
I'd also like to use that for creating a language file, so to translate my
website, I'd only have to modify that file...
Thanks!
I just found out that Const would do that for me, but now I need an equivalent to #ifdef, #else and #endif...
---------------
http://www.edovia.com
|
|
|
|
|
Hi All,
I am using ASP.NET and C#
I would presume this is an easy question but I can't seem to find any information about it.
I would like to add a button to my webpage that when clicked acts just like the print option of Internet Explorer. ie. Brings up a box to ask you what printer you want to print.
I'm sure there must be a straight function that I can call, something like Document.Print?
Thanks,
Gavin
|
|
|
|