|
I usually roll my own 'admin' type grids, where users can add new rooms, add new departments etc to an app. No problem. I've been looking at the DataGrid (a tad late in the day maybe) and have a few questions...
Basic Database Table For Room:-
ID DESCRIPTION
1 Room 1
2 Room 2
3 Room 3
Obviously, ideal for a datagrid to add, update, delete etc. All fine up to now.
Table for Subject
ID DESCRIPTION
1 Subject 1
2 Subject 2
3 Subject 3
Again, no problem, users happily adding subjects.
Now....Teachers. (This is all hypothetical by the way....)
ID DESCRIPTION ROOMID SUBJECTID
1 Mr Big 1 2
2 Mr Large 2 3
The RoomID and SUbjectID are constrained in MS SQL so only rooms and subjects that exist can be used. When displayed on the front end, this would show Mr Big, Room 1, Subject 2. But...how would I get the user to populate this sort of table using the built in datagrid (or other controls)? Rolling my own, I usually have a label showing the word 'room' and when clicked, it magically turns into a dropdown with the available rooms, the same for subjects. But does ASP.NET have some magic stuff that allows me to do similar?
All the samples of the datagrid I see are for flat tables, not relational like this, or if they are relational, they are 'select' only. Happy to be made to look stupid and have a google link posted in all it's glory that i missed...
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
i want to query through xml file by LINQ but i dont know how can i use LINQ?
what's the requirement to use LINQ in .net framwork 2
and plz help me code also
or give me links or url to this subject
Kareem Elhosseny
|
|
|
|
|
How about this one? [^]
only two letters away from being an asset
|
|
|
|
|
thx my dear
but show me the differance between LINQ and when i use
using System.Xml;
using System.Xml.XPath;
i think it same or wht???????????????????????
Kareem Elhosseny
|
|
|
|
|
Perhaps you didn't understand the previous reply. Look it up yourself, the resources are there.
only two letters away from being an asset
|
|
|
|
|
Perhaps you didn't understand that he wants you to do his thinking for him.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
thx mark
Kareem Elhosseny
|
|
|
|
|
maybe xpath?
/\ |_ E X E GG
|
|
|
|
|
Hi,
I am using ASP.NET 2.0 and C#.
I have a backend where the admin user can change a member's password.
The Membership class has a ChangePassword method that requires the username, old password and new password as parameters. No I am the admin user, and I need to change a user's password, but I don't have the old password. What do I do now, must I implement my own change password method?
Please help.
Regards
ma se
|
|
|
|
|
Yes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi
please tell me how can i embbed swf file (flash) into asp.net page.
Moving along u .... Future
|
|
|
|
|
You need to use the object and embed tags. See this[^] link for details.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am trying to create an html file using the FileSystemObject. I can easily create a new file in the required lcoation but whe I get the file and open it as a textstream for writing I get the following error.
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file
Now I'm sure there is an easy way of doing as the error says (tho I don't know how)..but I'm not sure if this will help as the website will be moving to another server on which I have little control over user rights and the like. All I know at present is that I can create a new file on a shared drive on that server (this i tested).
So...I was wondering if anyone knew (or could show me sample code) on how to do the following:
1) Create a file object
2) Write contents to the file object (opened as a textstream?)
3) Save the file object
This would mean I needn't create the file and then have to open it for writing as it will already be written to when it is saved.
Does this make sense? I am playing around with the code at the moment with little luck, so any help would be most welcome.
Thanks
Guy
|
|
|
|
|
i need the licen of EO.Web Controls Suite 2007.1 for ASP.NET
can any one send it to me
m_alkthere2003@yahoo.com
i am mazin i need to learn about vb.net and asp.net
|
|
|
|
|
1. Read the forum guidelines. 'help' is not an appropriate title for your message
2. Essential Objects is free. Go to their site and download.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Even if it were not free, as leckey has replied, don't come here asking for license keys to products
only two letters away from being an asset
|
|
|
|
|
hi all there is another q
can i loop throught the pages in my web application ?
Kareem Elhosseny
|
|
|
|
|
elhosseny wrote: can i loop throught the pages in my web application ?
Yes.. Directory class having options to get directories and list all files. Using this you need to build a custom algorithm which does this
|
|
|
|
|
hi all
really thx for your effort
i want to load Dropdownlist with all pages in my web applicaton
plz inform me how in details
Kareem Elhosseny
|
|
|
|
|
The only way that I can think to do this would be to use the Directory.GetFiles method to retrieve the names of all files that ended with .aspx, .html and .htm. You would need to loop through all of the directories in your application for this.
Note that this assumes that you aren't using a sitemap and you are using static content.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
dear Pete ;
exactelly thats wht i want
plz could u give me the code
i cant do that plz
Kareem Elhosseny
|
|
|
|
|
Pete, once you've done that, can you get in touch. I have loads of stuff you can do for me as well.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
And I'll stuff a broom up my ...
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am reading the contents of a file and displaying it in a lable on a web page.
There are also some special characters in the file such as :
à
é
The problem is that these chars are converted to square blocks like this � in display.
And this the the code i am using to read the file:
<br />
FileStream file = new FileStream(FilePath, FileMode.Open, FileAccess.Read);<br />
StreamReader sr = new StreamReader(file);<br />
<br />
string s = sr.ReadToEnd();<br />
<br />
sr.Close();<br />
<br />
file.Close();<br />
<br />
<br />
And this is the code whihc i am using to display the contents:
<br />
lblStaticContent.Text = s.ToString();<br />
Please help.
Deepak Surana
|
|
|
|
|
A StreamReader by default uses the utf-8 encoding. If any other encoding was used when creating the file, you have to specify that encoding when you create the StreamReader .
---
single minded; short sighted; long gone;
|
|
|
|