|
The delay is caused by IIS dynamically compiling the application on the first run after it is rebuilt. You'll also notice this happening if you stop IIS and start it again.
I personally don't think this is a big problem, and this approach provides a number of advantages. However, if it is a big issue for you, have a google for pre-compilation in ASP.Net 2.0.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
Is it possible to update Embedded resource file dynamically?
can we add a new Embedded resource file dynamically?
Please Provide some samples
|
|
|
|
|
No. Since the resources are compiled into the .EXE and the .EXE file is locked for the entire time your app is running, you can't modify the file.
|
|
|
|
|
Couldn't you do the following...
1. Exe1 starts running, with resourceA in it
2. Exe1 spawns Exe2
3. Exe1 is killed (either by Exe2 or it kills itself)
4. Exe2 modifies resourceA in Exe1
5. Exe2 spawns Exe1
6. Exe2 is killed (either by Exe1 or it kills itself) The step in question is step 4, as the others are pretty well defined. Is there some way to perform that step?
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
|
This would work. It requires that your .EXE talk to another and pass what it needs to do to the 2nd .EXE.
It is possible to modify the resources, but with great difficulty. There may be a 3rd party library out there that can do this, but I haven't found one. Not that I would want to do this myself. I'm of the opinion that if you feel the need to have your app edit it's own resources, then you really need to rethink your design.
|
|
|
|
|
I would agree that this is not the standard way to go about doing things, but I can think of a time when it would be useful (and perhaps desireable) to have a second app modify the first: an auto updater application. If you change a binary by only modifying an associated resources, then an automatic updater should be able to only download that resource instead of the entire binary file. I think this use, although rare, is completely appropriate for such a methodology. Just my two cents. Thanks,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Skippums wrote: but I can think of a time when it would be useful (and perhaps desireable) to have a second app modify the first: an auto updater application.
I didn't say that was the problem. The problem was changing the resources of the target .EXE without damaging the .EXE. The file would have to be rewritten, at least partially.
Skippums wrote: If you change a binary by only modifying an associated resources, then an automatic updater should be able to only download that resource instead of the entire binary file.
This technique is used to do byte-patches of applications, but not normally to modify the resources of an .EXE in the normal course of the execution of the app.
I'd day that if you had to modify the resources, compiling the resources into a seperate .DLL would be the safer way to go, as well as being more flexible in the case of localized versions of the resources.
|
|
|
|
|
Hi every body,
Sandeep here.I'm a very big fan for .net applications. I'm have zeal to know new types of programming. In this process i came to know that "the code project" is a very good website to achive my goal.
Here my question is : Recently i took one source code on c# application. having so many files including ".dll" files also. Now i need to use these .dll files in my application. Can i use or not. is it a legal thing or not.
Pls mail me regarding to my question above stated.
my communication mail id is : sandeepgrt@gmail.com
Expecting response from all......................
|
|
|
|
|
Where are you getting the dlls? Check the licenses of the code you are using.
|
|
|
|
|
It is best to not put your email address in a post.
Sandeep kumar M wrote: having so many files including ".dll" files also. Now i need to use these .dll files in my application. Can i use or not. is it a legal thing or not.
Depends on the licensing of each of the .dll's. Are they ones you created or got from other sources?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi
i have the following code which stops users from ctrl copy text in a gridview however i want it to work without the pop-up box coming up, is there a way to do this?
cheers
function noCopyKey(e) {
var forbiddenKeys = new Array('c','x','v');
var keyCode = (e.keyCode) ? e.keyCode : e.which;
var isCtrl;
if(window.event)
isCtrl = e.ctrlKey
else
isCtrl = (window.Event) ? ((e.modifiers & Event.CTRL_MASK) == Event.CTRL_MASK) : false;
if(isCtrl) {
for(i = 0; i < forbiddenKeys.length; i++) {
if(forbiddenKeys[i] == String.fromCharCode(keyCode).toLowerCase()) {
alert('You are prompted to type this twice for a reason!');
return false;
}
}
}
return true;
}
|
|
|
|
|
Jamie1985 wrote: alert('You are prompted to type this twice for a reason!');
remove the line with the popup?
|
|
|
|
|
I guess you got that code from somewhere else huh? Otherwise you'd know exactly what to do.
But yeah, just remove the alert.
Also, when last i checked, c# didn't have, alert or var.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Yeah that looks like JavaScript to me
|
|
|
|
|
hi
all, any body
pls help me to solve my problem. Though my code is right (i feel) i couldnt achieve the result i expect , i tried in all means, any one pls solve my headache!.
private void DataGrdVw1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)<br />
{<br />
string CurrentSelValue;<br />
CurrentSelValue = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();<br />
txtAreaName.Text = CurrentSelValue;<br />
}
it doent works!.
i tried with cell mouse down event also no use.
private void DataGrdVw1_CellMouseDown(object sender,DataGridViewCellMouseEventArgs e)<br />
{<br />
<br />
<br />
this.GrdText.Text = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();<br />
}<br />
i need to show the current cell s text in a text box when the datagridview's cell is clicked with mouse, or arrow keys
pls help
kssk
KSSK
|
|
|
|
|
Use the DataGridView's CellEnter event, and then use the CurrentCell property:
private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e)
{
label4.Text = dataGridView1.CurrentCell.Value != null ? dataGridView1.CurrentCell.Value.ToString() : String.Empty;
}
Notice that I'm also checking here if the cell value is null, and setting the textbox text to String.Empty if it is, otherwise you get a nasty Null Reference Exception when trying to call ToString() a non-existent value.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
Hi,
I've seen some programs use wide images which have like 3 images inside and on run-time only a third on the image is shown in a picture-box and on mouse-over a different third of the image is shown and on-click a different third of the image is shown. does anyone know how to do that or there any built class for such things?
Thanks
|
|
|
|
|
Hi,
there is about 100 ways how you can do that . However there is no class that would support that in .NET namespace directly. You have to write your own or maybe use somebody's else custom class. Override the OnPaint method of control class and render the part of Image you need according to mouse state (whatever condition).
hope that helps
zilo
|
|
|
|
|
is there a way that you can manually sort gridview columns
basically i want the columns to display in alphabetical order but only one column seems to display a-z at a time
i want a user to be able to click on sort a-z one column then sort a-z in another so both columns and together sorted a-z
hope this makes sense !
|
|
|
|
|
Jamie - yes multiple-column sorting is possible, but requires a little bit of work on your part. Here's an article to get you started: http://windowsclient.net/blogs/faqs/archive/2006/07/10/how-do-i-sort-on-multiple-columns.aspx[^]
If you're using .Net 3.5 you could also use LINQ.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
hi
i am having two forms
form1 is having two functions and a bool variable
code is ::::
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public bool s = true;
Form2 f2 = new Form2();
private void Form1_Load(object sender, EventArgs e)
{
f2.MdiParent = this;
f2.Show();
}
public void a()
{
MessageBox.Show("u r in a ");
}
public void b()
{
MessageBox.Show("u r in b ");
}
}
the code for form 2 is
:::::::
public partial class Form2 : Form
{
Form1 ff;
public Form2()
{
InitializeComponent();
ff = (Form1)this.MdiParent;
}
private void button1_Click(object sender, EventArgs e)
{
ff.a();
ff.b();
if (ff.s == true)
{
MessageBox.Show("yes");
}
}
}
error is coming at ff.a().. ff.b()...ff.s as object reference not set to an instance of the object ....
plz tell me the problem
n..solution too
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: error is coming at ff.a().. ff.b()...ff.s as object reference not set to an instance of the object ....
plz tell me the problem
The problem is as the exception said. In other words, ff is null .
sindhutiwari wrote: n..solution too
Think about the sequence that your statements are actually called in. You assign ff to be the MdiParent BEFORE you tell the form what its MdiParent is. Therefore ff is null because MdiParent is null at the time that ff is assigned.
The solution is to assign ff AFTER MdiParent is assigned. OR Don't use ff at all but to reference the MdiParent directly when it is needed.
You might also want to give things a sensible name. Form1, Form2, ff, a(), b() and so on are very poor names. They mean nothing to anybody.
|
|
|
|
|
Hi,
I'm newly using FileIOPermission class, Can any one explain me how to use this class in .Net 1.0 using C#, to set or get permissions for the file?
Thanks in Advance,
SMARTech
************************************************
If you think you can, You Can...
************************************************
|
|
|
|
|
shah_tech wrote: Can any one explain me how to use this class in .Net 1.0 using C#, to set or get permissions for the file?
Have you read the documentation[^]? It seems to have a fairly comprehensive example.
|
|
|
|