|
1) If I remove the runat="Server" attribute in the form, I can't use any of the server controls (asp:Button, asp:Label) or any of the server-side event handling INSIDE the form. I get a compiler error saying that in order to use server controls inside a form, the form element has to have the runat="Server" attribute.
2) I'm glad the ASP.NET 2.0 method is quite simple. That doesn't help me, though, because my server has ASP.NET 1.1.
3) I wouldn't want to use Server.Transfer because (to my understanding) that does not actually redirect the URL -- it loads the content of the target, but at the current URL location. But for various reasons, I actually want the location to be changed to the target document.
-> And, if I use Response.Redirect instead of Server.Transfer, then I don't think I can use the Request.Params directly any more.
Sorry to be such a pain, but I would still appreciate any help you might be able to give me.
-----G
|
|
|
|
|
1) If form runat="server" is removed then you can't have server side controls (Web & HTML server controls). Its going to be just plain old HTML controls
2) You can always post back to a form by posting back to a different form through code. I know its not simple however I thought I will share it with you.
On post back of the first form, retrieve the post back values and then post it back to another form.
String postedData = "field1=field1data&field2=field2dataOk";
StreamWriter out = null;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://yourURL/secondForm.aspx");
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postedData.Length;
request.Method = "POST";
out = new StreamWriter(request.GetRequestStream());
out.Write(postedData);
out.Close();
"field1=field1data&field2=field2dataOk" should be replaced with the actual list of form variables
3) Changing the action url using javascript on submit will be one of the option but you may have to do a lot that is unconventional.
|
|
|
|
|
#2 and #3 both make sense to me, and I will look into them as options.
Thank you very much for your help!
|
|
|
|
|
I have a form with one text field and one label and a submit button.
I have a regular expression validator on the text box field. Now i want
to clear the content of the label when i hit the submit button but the
regular expression validation on the text box is getting executed before
label clearing code.
My question is there a way to run some code to clear the label field before
validation on the form. I tried putting some code to clear the label in the
page load event but that doesn't seem to help.
Any help is greatly appreciated
|
|
|
|
|
Can you use javascript instead of validator control? if so you can change the value of the label before going to validate the textbox.
|
|
|
|
|
in the button event, do the following:
if (obj.AlphaValidate(txtValidate.Text))// checks for error.....
{
epObj.Dispose(); // if no error found, dispose Error Provider object
MessageBox.Show("No Error!");
}
else
{
txtValidate.Text = ""; // Clear text before showing off error
epObj.SetError(txtValidate, "Error");// Show error
}
|
|
|
|
|
Hi all
I have a customized data grid that shows and deletes employees
but I could not handle the GridView1_RowDeleting sub
Could u please help me...
nour_fa@yahoo.com
Nour
|
|
|
|
|
It would be helpful if you provide your code and where you are getting the error.
|
|
|
|
|
Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
Try
'What is the code to put here
GridView1.DeleteRow(...what?)
GridView1.DataBind()
Catch
Response.Write(Err.GetException)
End Try
end sub
Thanx dear
|
|
|
|
|
I develop a website and i want to integrate a chat room and a forum facility.So plz send me so soon the full source code for both.
Cheers!
Thanks guys.
|
|
|
|
|
You searched very hard through CodeProject did ya?
|
|
|
|
|
I'm really hoping this is a joke.
|
|
|
|
|
hi
i use crystal Report Xi and visual studion 2005
i put image in crystal report and link this image with parameter
its working fine with design and preview time if we provide other image name at preview time in parameter
if i call this report with vs2005 vb.net program and pass the image name by parameter but it not show the new image it is show only old image
i already checkwith the same process with put images name in database and link this database field name with image, but its show old image
if any one work on the same problem pls help me
Sanjay Modi
modi_sanjay@yahoo.com
Sanjay Modi
|
|
|
|
|
hi friends
what is meanby webservices in .net.why we use webservice
regards
saravanan
|
|
|
|
|
An external service on the web.
|
|
|
|
|
A webservice is like a class that is published on the web and therefore available to anyone in the outside world as long as they know what kind of data they need to pass to it.
You could use it to run logic that need to be available to different formats, for example a mobile device and a pc.
My company has a PC program that connects to the internet to check for updates, and uses a webservice to perform the update.
You should be able to find a lot more information about webservices on MSDN or even google.
|
|
|
|
|
|
Hello,
I am using a TextBox, Button and DataList.
When I submit a value from the TextBox adding the value to a row in my DataTable binding the DataTable to my DataList. I would like to be able to keep clicking the button adding new rows to the DataTable keeping the state.
Example.
Submit 1:
Add row value 23413
Submit 2:
Add row value 99999
DataList Shows:
23413
99999
Thank you so much for the help.
RB
|
|
|
|
|
Odds are this is homework, but check ViewState/Cache/Session
|
|
|
|
|
How would I go about uploading a file from an aspx page over the internet to a server using SSL? We have the certificate but how do I integrate all that into my code?
|
|
|
|
|
Dear CPians,
I need to register a User Control to a page programmatically. Is that possible?
Please note, I don’t want to Load it dynamically, I know how to do that. I only want to register it dynamically in order to ParseControl it later on.
Any ideas?
Thanking you in advance,
|
|
|
|
|
Hi all,
I want display my title for alert messagebox.
I don't want to display browser name in title bar.
Is any way to do this?
Any help is appreciated.
Regards,
Vijaya
-- modified at 9:24 Friday 17th November, 2006
vijaya
|
|
|
|
|
Inside a Page event
Dim msg as String="Your Data " & dataValue
Page.ClientScript.RegisterStartupScript(Me.GetType(),"alertMessage1",String.Format("alert('{0}');",msg),True)
|
|
|
|
|
In short: No.
I know that some version of Internet Explorer stored the text to be displayed in the title bar in an .ini file somewhere. If you have control over the client system you could edit that file.
---
b { font-weight: normal; }
|
|
|
|
|