|
Then why can't you do this on one page.
It would make you life a lot easier.
Just dump the contents that is in Form2.aspx into a panel in Form1.
Set Visible to fasle and once the button has been clicked just make it Visible.
Will save you a lot of trouble. The only other way is if you store all the values in Session variables.
|
|
|
|
|
Thanks Bardy. I will try that in Panel.
|
|
|
|
|
Hi Bardy.
I tried that in Panel as you told.
But when i click on button, i am getting Runtime JavaScript errors like
Microsoft JScript runtime error: Object required
Microsoft JScript runtime error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: element
|
|
|
|
|
Could you please paste some of your code so I could see.
You can take the Response.Redirect out of the button event.
|
|
|
|
|
Hi,
Here is my sample code:
I Placed a ImageControl, btn_PnlClose. design into Panel 'PNL'.set Visibility : False
I used update panel to upload a file using fileupload control.
Form1.aspx:
pageLoad()
{
//
}
btn_UploadClick() //Here i used update panel
{
//Uploading a file
//Adding uploaded file into ListBox
}
btn_ShowClick()
{
imge1.ImageUrl = "uplode file url here";
PNL.Visible = true;
}
btn_PnlClose_Click()
{
PNL.Visible = false;
}
////////////////////////////////////
When i build this, its successful.
But when i run this, When i click on btn_Show i got javascript runtime errors as posted in previous reply.
|
|
|
|
|
This seems weird because I have a page on my application which uses an update panel. The update panel contains a grdiview and a user can click on a row in the gridview to go to another page. On the other page I put a back button with the same code as yours and it went back fin, or be it with the page being reset.Can you explain anymore about your problem like what code is runnign on the first page
|
|
|
|
|
Hi,
I used update panel to upload a file using fileupload control.
Form1.aspx:
pageLoad()
{
//
}
btn_UploadClick() //Here i used update panel
{
//Uploading a file
//Adding uploaded file into ListBox
}
btn_ShowClick()
{
// taking path of uploaded file sending that in a query string to Form2.aspx
Response.Redirect("form2.aspx?path="+uploadedpathhere,false);
}
In Form2.aspx:
PageLoad()
{
if(!Page.IsPostBack)
{
image1.ImageUrl = Request.QueryString["uploadedpathhere"].ToString();
//Its working fine
}
}
I set Property 'PostBackUrl' of LinkButton 'Back' : javascript:history.go(-1)
When user clicks on Back button, I can see the URL 'form1.aspx' but the Page is not displayed.
It displays message : The webpage has expired.
But when i refresh browser, i can see the page with old values.
But it not happens when i hit on back button.
|
|
|
|
|
User Response.Redirect instead of PostbackURl as this wont be maintaining the state and calls for the page reload.
|
|
|
|
|
i m using SQL server 2005.in this i have a field "Place". i have made a form in which i have used drop down list in which these Place field is shown.in C# i want a code so that if user select the particular place from that drop down list, that should be entered in the database of SQL server 2005.i have made a add button on the form for the user to add the selected place in the database.the required coding i have to write in this add button.
|
|
|
|
|
just write insert statement ..... pass the value dropdown1.selecteditem
|
|
|
|
|
I have got a field in a table which is of xmltype, say file_block
the data for the same is structured as shown below
<control id="txtWeight">
<value>74
<control id="txtHeight">
<value>174
And the above structure is taken in different ways for different
purposes in project so i cannot change that
DATA VALUE
txtWeight 74
txtHeight 174
Now how could i retrieve the data as a tabular structure as shown above using xquery. Please help if anyone know how to do that
|
|
|
|
|
Hi,
I have webform created in asp.net 2.0. I use createuserwizard control.I want to store the datas from the control to my database that i have created in Microsoft sqlserver Management Studio.the control by default stores in aspnetdb which i don't want.I have changed the connectionstring in web.config as per my requirement.And have wrote the insert query based on that configuration.
Can ne body help me of what i should do further???
zari
|
|
|
|
|
Hi all,
I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:
<div style="text-align:center;">
<asp:Login ID="login" runat="server" ... />
</asp:Login>
</div>
The same thing will happen if I replace the Login with a Table Control.
I have tried adding the property align="center" to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy.
So how do i get such a control to center in FF?
|
|
|
|
|
Sometimes align="CENTER" is not picked up in VS 2005, just put it in and run the project and see if it works.
Or try and change the target schema for validation. It should be sitting in your toolbar at the top of your screen if not right click and select HTML source editing.
Hope this helps
|
|
|
|
|
As it turns out, I did not need the align="center".
This is what I used:
<div style="text-align:center; margin: auto; width: 300px;">
<asp:Login ID="login" runat="server" ...>
....
</asp:Login>
<div>
I got this answer from http://forums.asp.net/t/1280636.aspx
|
|
|
|
|
Hi
I have an asp .net application that uses image handlers to generate and send images to users, the image handler has the property IsReusable = true which means it is reusable for multiple requests.
I have two questions:
1. When serving multiple users simultanously, are users served on strict queue basis, which means that the image handler will not be serving "multiple requests" at the same time.
To clarify: what I am worried about is something like the following scenario:
I have two users A and B accessing the application simultanously, I have a static varible v (in the image handler) having its value changing depending on some criteria. Now is the following scenario possible:
1. User A requests an image
2. Depending on some user criteria I set v = 1
3. User B requests another image.
4. Before finishing user A's request, ImageHandler attemps to serve user B
5. Depending on some user criteria I set v = 2
6. Imagehandler finishes serving user B.
7. Image handlers switches continue serving User A, but v = 2 (depending on user B criteria) but it should be 1.
Is the above scenario possible?
My second question:
My Image handler reads data from a database for every image in a simple manner:
1. open connection.
2. read data.
3. close connection.
But because I know that only one copy of my image handler will be running so why not just open a connection in a static constructor and leave it open instead of opening/closing connections for every request? I think it will improve performance, but I am afraid that it is not a good practice.
Thanks for everybody
And ever has it been that love knows not its own depth until the hour of separation
Mohammad Gdeisat
|
|
|
|
|
I want to develop a web page from which i can post a message on two different applications. Say I have a web page
called maintenance. It has the following fields
1)application name - dropdownlist (ddlApplication) - value - App1 or App2
2)message - textbox (txtMsg) - value - Site under maintenance
3)visible - dropdownlist (ddlVisible) - value - True or False
4)Update - button (btnUpdate)
when i choose the application name from the ddlApplication, enter the message to be displayed, and set the ddlVisible
i want the message to get displayed in the respective applications home page. What is the best possible approach?
Thanks.
|
|
|
|
|
If the content on the Respective home pages are being read from a database, then once the update Button has been clicked then you could just update the relative Database's which would then be showed on the Home Pages.
I think that would be best.
Hope this helps.
|
|
|
|
|
My application is written in ASP VB.Net VS-2002.
I am successfully calling another VB executable using Process.Start method and I am successfully able to maintain my Session Variables as a result of using sessionState mode="SQLServer".
My issue is related to the need to have my primary ASP.VB wait until all processing is complete in the VB.Exe Process.
I have tried both the Process.WaitForExit Method and the HasExited property. These accomplish the wait but produce the Configuration Error :machine.config could not be loaded. Attempted to access an unloaded AppDomain.
Pseudocode Snippet
-------------------
This line writes an entry to a log file.
myProcess = Process.Start(my.exe, sArguments)
Do While Not myProcess.HasExited
System.Threading.Thread.Sleep(10000) 'Every ten Seconds.
Loop
This next line would write to a log file, but never does.
------
Instead I get the Configuration Error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The XML file c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config could not be loaded. Attempted to access an unloaded AppDomain.
Source Error:
[No relevant source lines]
Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 0
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
--
Is this because I'm timing out in ASP.NET? Any suggestions or tips would be wonderful.
|
|
|
|
|
For anyone else that might be experiencing this issue or something similar, the only way I was able to get around the process threading issue was to write my own HasCompleted vb routine looping for the existence of an end of process file.
|
|
|
|
|
I have an ImageButton in the Item Template of the fourth column of a gridview. I am trying to access it in the *.aspx.cs file but am unable to do so. I need this button to pass it as a parameter to a method and have tried multiple routes including this one which seemed like something that should have worked:-
(ImageButton)Gridview.FindControl("EditButton");
"EditButton" is the name of the ImageButton
Could anyone help me out.
Thanks,
Sudeep
|
|
|
|
|
When calling a method such as this: (ImageButton)Gridview.FindControl("EditButton"); you need to tell it which row to get the control from. So it should look like this:
(ImageButton)Gridview.Rows[0].FindControl("EditButton");
The number (0) is the index of the row.
Alternatively you can get it in the ImageButtons onClick method. In this case, the sender parameter (comes in as an object) is the ImageButton.
|
|
|
|
|
|
Dear ASP Gurus,
I am populating my multiline textbox on page in UpdatePanel with some text as
header name + vbnewline
------------ + vbnewline
value1 + vbnewline
value2 + vbnewline
.
.
.
value30 + vbnewline
.
.
Now I need to get the print of my web page but for now only first 10 rows are visible in the print
I need to expand this textbox to see all the rows in my print out. How to expand this textbox at runtime probably at two points.. 1. after I populate the textbox or 2. at page.ispostback = true
may be at client side or server side?
Could you please help me?
regards
Lee
Could you please help me.
Leya
|
|
|
|
|
This should show all the lines;
TextBox mytxtBox = new TextBox();
mytxtBox.Rows = X;
X being the number of lines you will have.
Hope this helped.
|
|
|
|