|
Well, you need to write some logic for this. You may take a look at Custom Actions and use an installer class to read the previous web.config before it is overwritten by the new file.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well I am using Installer class : OnBeforeInstall event, but that fires after the old web.config file has been replaced by the new install !
|
|
|
|
|
Hey everybody...
Does anybody know where I can obtain a downloadable version of the ASP or ASP.NET Documentation? I don't care what format it's in. I've not been able to find it anywhere on MSDN or Google. I've been searching for weeks.
Also, I have Visual Web Developer, But it doesn't seem to want to position elements properly. One second they're where they're supposed to be, then I click "..Sync view thing" and then the controls on the page are in a slightly different position... Any ideas, anyone?
Thanks
jase
|
|
|
|
|
|
Thank you sir much appreciated.
regards
jason
|
|
|
|
|
Hi,
Im using a stroed procedure to update records in a SQL2005 DB. To send info to the procedure i run something similar to this:
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@email", tbxUsername.Text);
cmd.Parameters.AddWithValue("@password", tbxPass.Text);
cmd.ExecuteNonQuery();
Under certain circumstance i wont want to update the @password field. Is this possible, if so how? Or do i need to use a seperate stored procedure which doesnt mention the field(s) which shouldn't be updated?
Thanks.
|
|
|
|
|
The logic is entirely up to you, since I don't know the detail I can't guide you on what is the best course of action. I would say that if the code will do different things then it should be in a different sproc.
Does the current sproc do more than update the password? If so what? And what circumstances don't you want to sproc to update the password.
And this question belongs in the database forum.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Hey...
you are not running a query. Just check the value of password, send DbNull.Value from here and check in the stored Proc :
If @password IS NULL
BEGIN
-- Update only the UserName
END
ELSE
BEGIN
-- UPDATE both username and password.
END
|
|
|
|
|
Hi, I have developed one webpage, in which it read data from database and process each record with some logic and the final output is set to excel file. If the table contains more than 100 thousand records, my aspx page get expired. But backend the process is done. How to avoid the expiration of page.
I reasearch some part and used below code. but no use.
private int timeOut;
private void Page_Init(object sender, System.EventArgs e)
{
timeOut = Server.ScriptTimeout;
// Give it 1 hour = 3600 seconds
Server.ScriptTimeout = 72000;
}
private void Page_Unload(object sender, System.EventArgs e)
{
Server.ScriptTimeout = timeOut;
}
G. Satish
|
|
|
|
|
If the process takes long enough that your page expires the first thing I'd look at is re-architecting the solution rather that trying to work around the issue.
From a UI perspective you should have some feedback for the use if there is a long running process. You could possibly use an AJAX call to refresh a progress bar.
only two letters away from being an asset
|
|
|
|
|
IIS would recycle the worker process after the specified timeout period. As suggested by the other member, you may like to review your architecture towards lessening (or rather balancing) the load.
There are tweaks like extending the runtime attributes in web.config/machine.config which might apply for your application only after a careful study of the same and its genuine need.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
the way you are doing currently is almost impossible and senseless to keep page alive for so long.
However you can make an asynchronous call to a function which will do all the required processing and after successful completion will sent back confirmation through ws_callback method. then you can show the "successfully done" message to confirm that processing has been done.
You can google for asynchronous calls
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
i want to display an error with the help of message box
i wrote mbox("Enter the empty fields");
its showing an error mbox doesnt exist in this context
what should i do
am i missing any directive
somebody help.
thanks in advance
|
|
|
|
|
Show here your code what far you did.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
Simply use javascript to display messagebox.
example:
javascript:alert('Enter your message string here!');
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I can't believe that someone asked you to show your code. Your core issue is manyfold.
1 - you're obviously using some sort of VB shortcut. Ugly
2 - you can't show any UI on the server, because, well, it's the server. If this worked, it would freeze execution and bring your server to it's knees. I recommend reading a book on ASP.NET, so you understand what ASP.NET is and does, and what the server is. Then a book on javascript, if you MUST show a popup message, you need to do it on the client, which means you need to do it in javascript.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Christian Graus wrote: I can't believe that someone asked you to show your code.
Often times is becomes much easier to help when an actual code snippet will show exactly what the problem is rather than rely on a poster's often inaccurate, hazy, vague, incomplete or misunderstood interpretation of what is going on.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Colin Angus Mackay wrote: when an actual code snippet will show exactly what the problem is
OMG! That would invite trouble sometimes. The poster might get really attracted by such initial offer and CTRL+A, CTRL+V his Visual Studio file.
Do you really want to get torched by that scorching torture?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Vasudevan Deepak Kumar wrote: OMG! That would invite trouble sometimes. The poster might get really attracted by such initial offer and CTRL+A, CTRL+V his Visual Studio file.
Do you really want to get torched by that scorching torture?
Then use the word "snippet". Seriously - I'm tired trying to help sometimes because most people don't actually want help. But I do my best, and if cutting out one barrier helps me help someone then I can put up with the occasional nutter who posts everything. The majority do not.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Hello All,
I have designed a report with ASP.NET page.
Now I want to fix the header section while scrolling down the report.
How to get it?
|
|
|
|
|
Check this out.
This might help.
http://www.codeproject.com/KB/scripting/HTMLFixedHeaders.aspx
|
|
|
|
|
|
Hi All,
i am developing one web application with two language in English and Arabic in my application i used master page and other pages are content pages i used Link Button for Language selection in master page i create BasePage.cs in App_Code the BasePage.cs code is
1 protected override void InitializeCulture()
2 {
3 string currentCulture = Convert.ToString(Session["userCulture"]);
4 if (!string.IsNullOrEmpty(currentCulture))
5 currentCulture = currentCulture;
6 else
7 currentCulture = "en-us";
8 Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(currentCulture);
9 Thread.CurrentThread.CurrentUICulture = new CultureInfo(currentCulture);
10
11 base.InitializeCulture();
12 }
i create Global.asax file also and the code for this is
void Session_Start(object sender, EventArgs e)
{
Session["MyCulture"] = "en-us";
}
in MasterPage.master i write the code for ButtonEvent for OnClick event and the code is
protected void changeCulture_Click(object sender, EventArgs e)
{
LinkButton senderLink = sender as LinkButton;
Session["userCulture"] = senderLink.CommandArgument;
Server.Transfer(Request.Path);
}
and i create the resource file for only one page that is orderonline page in Arabic and in English i put this file
in App_Resource folder and i make all pages derive from BasePage instead of Standard System.web.UI.Page
now my question is when i run this application and i try to click the Arabic or English Button to change the
language instead of generating the onclick event from the linkbutton simply its submitting form in orderonline.aspx which have resource file in App_Resource folder
if i open some other page like about us etc from this page i can easily change the language
where i am doing mistake i don't can any one help me for solving this problem
thank in advance for any help
|
|
|
|
|
Maybe you should use
Response.Redirect(Request.Url.ToString());
instead of using Server.Transfer(Request.Path);
Maybe you could also post you aspx code as the parts of yout aspx.cs code so we can see how it works.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|