|
Yes
This is something like Message Board(Discussion Forum)
My Task is to design Discussion Forum (just like this CodeProject.com)
thanku
priya
|
|
|
|
|
U need to use nested datagrid or datalist. Do a google on Hierarichal datagrid or Master-Child/Parent-Child and u shud hav plenty of examples regarding this.
HTH
|
|
|
|
|
Hello, I have three tables: Personnel, Course, Education. with persid the primary key of the personnel table and foreign key in the other two tables.
My problem is:
Show personnel details that are either following a course or an education.
Can some one please help?
thanks alot,
Commickey
|
|
|
|
|
|
I want to select information of personel in schools and personeels in curses and display at once... so my querry should contain three of the tables at once... any help?
|
|
|
|
|
|
some personeel have education history
others have short course history
I have 3 tables: Personeel, Courses and Education.
Personeel table have primary key persId which is foreign in the other 2.
My question:
How do I get the personel details of:
those havin education history
those having course history
Combine the above two in one list and display as just a single list in a datagrid? This will become the list of active employees.
How will the querry look like and what other things do I need to do... I have tried several things out but I am really stuck.
Thanks alot,
Commickey
|
|
|
|
|
One option:
Select t1.persId, t2.courseDate, t2.courseName, t3.educationDate, t3.educationName
from (Personal t1 full outer join Course on t1.persId = t2.persId)
full outer join Education t3 on
t1.persId = t3.persId
where ......
.....
Second option
Select t1.persId, t2.courseDate, t2.courseName
from Personal t1 full outer join Course on t1.persId = t2.persId
where
...
...
union all
Select t1.persId, t2.educationDate, t2.educationName
from Personal t1 full outer join Education on t1.persId = t2.persId
where
...
...
Both query will give you the result. The first query works in Oracle - If you need SQL server I will help you - Actually I tested it and it works fine on sqlserver or any other ANSI RDBMS.
Yossi Kahlon
-- modified at 10:55 Wednesday 21st June, 2006
|
|
|
|
|
Hello
How to do client side validations?can we use javascript for it?if yes then how to write javascript for it?could u plz send me the code for it.
Yogesh_T
|
|
|
|
|
|
how to validate any url ?
eg. http:\\www.sample.net.in or
www.gt.com or
any genral pattarn od url
|
|
|
|
|
|
If user clicks a link from web browser,setup found in the link should automatically run setup in client system(For Ex:It should install a font in the client machine)
Sathiyaraj Ganesan
|
|
|
|
|
Sathiyaraj Ganesan wrote: If user clicks a link from web browser,setup found in the link should automatically run setup in client system(For Ex:It should install a font in the client machine)
Yeah man - it really should shouldn't it
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello,
I have created a website in ASP.net 2.0 and uploaded it to the webserver. The following error message is displayed.
Compiler Error Message: CS0246: The type or namespace name 'Utilities' could not be found (are you missing a using directive or an assembly reference?)
where utilities.cs is a class file placed in APP_CODE folder in the same namespace as the website.
The site is running fine on the local server.
The web server is also unable to load the code behind files.
while everything seems to be fine on the local system.
Now i came to know that Framework 1.1 is installed on the web server. Could this be due to version problem??
i am able to run the pages on the webserver without calling the class.?
Could anybody please suggest me a solution.
thanks,
sangita
sangeetha
-- modified at 2:33 Friday 16th June, 2006
|
|
|
|
|
If your code is built for framework 2.0 it will not work on framework 1.1.
|
|
|
|
|
HI all
In my mail application i got an error.
At the first 2 times it is working fine(sebding mails) but after that it is giving this error can any one help on this.
"The server rejected the sender address. The server response was: 501 Syntax error in parameters or arguments "
I am using yahoo SMTP for test.
And my application will send the details to mail
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
i want to read the contents of the Word or excel file into my aspx page may be in a container if you say.
I have tried by using Response.contenttyp but it shows a dialog box asking if i want to save or open the file.
I want to just read the contents of the the file no editing or manipulation of the data.
how can this be achived.
The main thing i want to achive is not showing the dialog box asking save or open, i just wnat to open the file.
Thanks in Advance.
Deepak Surana
|
|
|
|
|
Hi All,
Probably seems like a stupid question but how do I pass something like a CustomerID value from a GridView master record to an attached DetailsView form when creating a new details record in Insert mode. I have been searching for a good example and can only find samples working with existing records in both the Master and Detail tables.
What I am trying to do is open the DetailsView form in Insert mode perhaps with a LoadForm event or similar when the attached query returns no detail records and automatically pass the key record value for a new details record from the GridVew. I do not want the user inputting this information and would also like to possibly insert other values into the details record from the selected master in the GridView at the same time.
Thanks in advance
Kim
|
|
|
|
|
You can create a handler for the RowDataBound event of the GridView control, and in the handler you can get reference to the DetailsView control, then you can pass the CustomerID value from the master record to the input controls placed inside the DetailsView control.
|
|
|
|
|
Thankyou for the reply, it would seem from the number of posts on various ASP.NET forums I am not alone. I am not alone, I will explore the RowDataBound event as a means to capture the values in the GridView (CustomerID & Name)
I thought this was going to be easy, hooking up a Gridview and DetailsView for some standard Master/Detail data entry.
For anyone reading this post if you can recommend a good book that focuses on C# ASP.NET database front ends I would appreciate knowing its name. I have already purchased 3 books reviewed on the Microsoft site, one is over 1000 pages only find very little on hooking up these two controls in a real world examples.
I have both forms linked and working well when details data exists. I also have the DetailsView defaulting to Insert by using the following useful code snippet I found on another post, when there is no detail record.
protected void SqlDataSource2_Selected(object sender, SqlDataSourceStatusEventArgs e)
{
if (e.AffectedRows < 1)
{
DetailsView1.ChangeMode(DetailsViewMode.Insert);
}
}
Its at this point I want to populate the CustomerId & Name values from the selected Master record into the empty DetailsView record which is on a different page.
Many smaller examples show both controls on the same page.
I have tried the following from a post by Polita Paulas the creator of the GridView, DetailsView and FormView controls.
"The best way to do this is to handle the DataBound event, check if the Mode is Insert, then set the text in the controls to the default properties.
For instance:
protected void DetailsView1_DataBound(object sender, EventArgs e)
{
if (DetailsView1.CurrentMode == DetailsViewMode.Insert)
{
((TextBox)DetailsView1.Rows[0].Cells[1].Controls[0]).Text = "Default";
}
}
"
I have tried this with test data and cannot seem to get it to work, the Cell always remains empty, no errors are thrown.
A number of posts suggest you must use template fields, like the following post, I could not get this to work either.
protected void DetailsView1_DataBound(object sender, EventArgs e)
{
if (DetailsView1.CurrentMode == DetailsViewMode.Insert)
{
TextBox tb = (TextBox)DetailsView1.FindControl("TextBox1");
tb.Text = DateTime.Now.ToShortDateString();
}
}
I am thinking this must be so easy and thats why my posts on this site and another go vertually unanswered or its too hard and no one really knows.
|
|
|
|
|
If the Creator said the DataBound event is the best way, then it should be be your choice . There are a couple of things things that you might want to check:
+ Make sure the execution gets in the body of the if statement in the DetailsView1_DataBound event handler, I just want to ensure that your code does assign the default value to the input textbox.
+ Make sure you get reference to the right input textbox to set the default value. For example, make sure you do not assign a value to the input textbox of the BoundField or TemplateField with the InsertVisible property is set to false.
+ Make sure the Text property of the input textbox is not overwritten somewhere else.
Basically, when you get reference to the textbox with the DefailsView is in the Insert mode, you'll have 2 common options:
+ Use the rowindex and cellindex values, for example when you use the BoundField in the DetailsView control.
+ Use the FindControl method, and you use this way when define a TemplateField in the DetailsView control.
Perhaps, if you still cannot figure out the root cause, you might want to post your code snippets, that might help. In addition, I don't know off any book containing lots of examples about the GridView, DetailsView controls, but you may find online from the sites:
http://www.gridviewgirl.com[^]
http://www.gridviewguy.com/[^]
|
|
|
|
|
Thankyou for your patience, I will keep chipping away at it and take on board your suggestions. I have been trolling the Net on and off for a couple weeks and am pleased I am not the only one in this prediciment. Both the Gridviewguy and Gridviewgirl sites are good and I have seen posts from Gridviewguy assisting on forums but unless I missed something I could not see an example of what I am doing.
Scott Mitchell (www.4guysfromrolla.com) also has contributed some good examples to the Microsoft MSDN site at the following link.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx.asp
Scott has also contributed a number of good articles for Microsoft under learn at
www.asp.net
There are 13 articles with more coming and can they be downloaded as PDF files
At the moment I am compiling eveything I have trolled up and will go through it again in case I have missed something. I am trying to teach myself C# ASP.NET whilst building an in house application. My previous backgroud dates back to the xbase dos pre Windows days and then some early db work in Delphi and object pascal, so I am starting from scratch.
Thanks Again
Kim
|
|
|
|
|
How to perform email validaiton for windows applicaions in .net
|
|
|
|
|
Try this.
I think it will help you.
using System.Text.RegularExpressions;
public static bool CheckEmailAddress(string strText)
{
//Validates the Email address
string strPattern = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$";
return CheckRegExPattern(strPattern, strText.Trim());
}
public static bool CheckRegExPattern(string strPattern, string strText)
{
return Regex.IsMatch(strText.Trim(), strPattern);
}
|
|
|
|