|
Luc Pattyn wrote: show us some code
That might be helpful
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
plz all i want your help urgently
i have a form that include combo box which contain all axps pages in my web project
my case is>>>
when i choose each page from the combo box i can call each control in the selected page to load them in the main form
so i have to make a function which take my page.aspx name to return all controls in this page without open this page i mean without open the selected page previously .
really thx for all and special thx for each one can help me
Kareem Elhosseny
Kareem Elhosseny
|
|
|
|
|
You want to load controls from an aspx in another aspx ? Sounds like you need to create user controls that define what you want to load in two places, and use them in the two places.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Really thx for your attention Christian but i want to make a spot on my case ihave acollections off pages like page1, page2, page3.........
and a main page.aspx
in this main page i put combo box which load all pages if i choose any one of them i can see all controls in this page without open it previously
my problem in the fact i cant see the pages to access the controles in it
and asking if there is a way to make all pages in asp globally or public to see them in any place in my web project
Kareem Elhosseny
|
|
|
|
|
If I do something like this:
int i = Convert.ToInt32("asdfas");
without the try/catch block and start a program with the above line in VS2005, the IDE will catch the exception, show the appropriate message and position to the problematic line.
On the other hand, if I have an assembly that is loaded at run-time, for instance like this:
a = Assembly.Load(strAssembly);
Type ObjectType = a.GetType(strClass);
object obj = Activator.CreateInstance(ObjectType);
MethodInfo mi = ObjectType.GetMethod("SomeMethod", pars);
mi.Invoke(obj, null);
and there is an unhandled exception somewhere in the assembly, VS2005 will not catch that exception (even if assembly is compiled as DEBUG and can be debugged into) but instead 'mi.Invoke' will exit with generic exception 'exception has been thrown by the target of the invocation'.
Is there a way for VS2005 to catch these exceptions and position to problematic line like it does with non run-time loaded assemblies?
Dragan Matic
|
|
|
|
|
Hello,
I want to create my own XP Shell Replacement, preferably using C# or C. Are there any good only resources to tutor me on this?
Thanks!
C# and JavaME(J2ME) Programmer
|
|
|
|
|
If you are considering replacing the Visual Style UI, then good luck. The closest that I have come to doing that can be found on my article: http://www.codeproject.com/vb/net/transmenuandtitlebuttons.asp[^]. However, if you are thinking about replacing the 'Desktop Window' and then creating an environment without editing system information it may be more easier.
Using AutoIT (I believe that that is the correct name), you can get a handle of the desktop window which holds the taskbar, listview (desktop icon arrangement), etc. After you have a handle using WinAPI commands you can hide the window, take note of the parent. Create another window and set its parent to whatever the 'desktop window' parent is.
From a performance view, C may handle system resources better than a .NET application. Either of the languages should get the work done though.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I am developing an application in C# and want it to run under Vista environment. I am copying a specific file from a path to Windows/System32 Folder. However, I get access denied error even though I have logged in as administrator.
Thanks.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Does the file you are copying already exist in the folder?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Of course. I get the access deny error in vista. If I copy to sub-folder where the application reside, I dont get any sort of issue. I assume this is because of extra security measurement taken by vista. I am looking for a possible solution, since I have seen many applications having the access to system32 folder.
Thanks.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
You'll have to cope with UAC (look it up in wikipedia if you don't know what this means).
If you want to perform certain actions Vista deems dangerous, the user has to explicitely allow these actions. By embedding a manifest in your app telling Vista that it wants to be executed as administrator, you can perform these "dangerous" actions nevertheless.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have a program that uses 4 different user controls that are loaded in a panel depending on what the user wants to do. I add each UserControl to the Controls collection of the panel, but each time I fire the event that adds the UserControl to the panel the memory usage of my application increases although I clear the Controls collection. I have managed to stop this by implementing this method in each UserControl:
<br />
public void Dispose()<br />
{<br />
Dispose(true);<br />
GC.SupressFinalize(this);<br />
}
Is this the best method to handle this?
|
|
|
|
|
You can invoke the Dispose all you want, but the system will take out the garbage when it deems time to do so. I am sure there has to be some way to coax it along
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi ALL,
I have some dialog that hold UserControl that i wrote.
On the userControl i have some Button that when i click on him i need to Fire event to the dialog.
How do i do it ?
Does there is some method "FIRE_EVENT" that through the event?
Thanks for any help.
|
|
|
|
|
In the user control declare a delegate and event:
public event ClickHandler Click1;
public delegate void ClickHandler(EventArgs e);
In the button's click event raise the event:
i.e.
if (null != Click1)
Click1(e);
In the dialog add a handler for Click1:
myControl.Click1 += YourHandler
|
|
|
|
|
But How does the dialog know about the event ?
What i need to know ( and does not understand ) is the dialog know about the existing of the click event before i create the connection between the dialog and the User Control ?
Because i need to do it in late banding and i don't want to create connection between the dialog and the User Control in the design time - i want to create this connection in run time -
Can i do it ?
|
|
|
|
|
myControl.Click1 += new MyControl.ClickHandler(yourClickHandlerMethodInTheDialog);
myControl here is an instance of the user control whose class name is MyControl.
Yanshof wrote: What i need to know ( and does not understand ) is the dialog know about the existing of the click event before i create the connection between the dialog and the User Control ?
The instance myControl only exists at run time in all cases (even if you're using the VS Designer).
-- modified at 8:33 Monday 30th July, 2007
|
|
|
|
|
Hello,
In my C# Windows form, I have a datagridview which has a column name "id". Now, I want that, when the form is loaded, the gridview sort the column by descending order. I did not find any snippet to do so. Would you please help me by giving me a snippet.
Regards
|
|
|
|
|
Sort by ID in descending order while fetching data from database before you show in DataGridView.
|
|
|
|
|
Hi,
Thanks for your suggession. Actually I did that before, but for some other conflict in my project, I had to remove that Ordering in the database query. So, I thought, there could be some way to sort only that specific datagridview and not other gridviews in my form.
Regards.
|
|
|
|
|
Hi,
I have my way to sort DataGridView like this, but improve it by your self:
Step 1:
- I create stored procedure "sp_sort" that query is "SELECT * FROM tablename ORDER BY id DESC"
Step 2:
- On form load you type this :
<code>
SqlCommand cmd = new Sqlcommand("sp_sort", conn);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adapter.Fill(dt);
myGridView.DataSource = dt;
</code>
Regard,
Edwin
|
|
|
|
|
I have a MainForm which is MDI parent to all other forms. I want the to display the child forms as tab pages inside the MainForm. Is it possible? Can anyone help me with this please?
cellardoor
|
|
|
|
|
You don't need an Mdi setup to do that. It is possible to do in tab pages, though I'm not saying it's a good idea. You will you will not get designer support for this. You have to create your forms as if they were normal, then you have to modify the forms and add them to the appropriate TabPages in your code.
There is a hidden little property of a form call TopLevel . Set this property to False, then you can add the form to any container that holds Control objects.
|
|
|
|
|
Is it possible to write an enum like the code below.
public enum BloodGroup<br />
{<br />
None = 0,<br />
A+ = 1,<br />
A- = 2,<br />
B+ = 3,<br />
B- = 4,<br />
O+ = 5,<br />
O- = 6,<br />
AB+ = 7,<br />
AB- = 8<br />
};
Manzur Ahmed
|
|
|
|
|
No. My compiler complains about the first +. What compiler are you using to have to ask this question?
|
|
|
|