|
That was exactly the simple info I was looking for. I was always trying to use request.form - which doesn't work. and the only info I could find on posting to .net pages was from .net pages.
I appreciate your help in this matter. Its like you just reconstructed my brain after it exploded.
Anyone with the thing on getting the expired page error?
Again- thanks for the help
|
|
|
|
|
Anybody have an idea how I can override the browser's history buttons (back, forward)
in an AJAX-based application? I search all over the internet, and what I found was
only a few libraries. I don't want any third-party libraries. Anybody know how I can
do it myself?
|
|
|
|
|
I'd be surprised if you could. AJAX works by not posting a new page request. The back and forward buttons track your individual page requests.
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 )
|
|
|
|
|
I know that. But if there is a way to detect when the user presses the button, we can block it and do our desired action.
The World Is Mine...
|
|
|
|
|
I know that. But if there is a way to detect when the user presses the button, we can block it and do our desired action.
|
|
|
|
|
I know that. But if there is a way to detect when the user presses the button, we can block it and do our desired action.
|
|
|
|
|
i want to send data from page to another page in the url how
md_refay
|
|
|
|
|
Have you tried searching for an answer to your question?
Here is a code project article:
http://www.codeproject.com/aspnet/QueryString.asp[^]
Google has tons of hits on query string.
Please try to do a little work on searching for an answer before you post another question.
Ben
|
|
|
|
|
Hello,
I want to show a child web page from my current page (like a popup),user will enter some info in this child page then after clicking (Ok)all these data will be tranfere to a text in the parent page (the current page).Also,please I want to know how the response can redirect in a blanc page.
Dad
|
|
|
|
|
If you use javascript you can do stuff like self.opener.forms... to set fields on the form who opened the child form. It can get kind of complicated if you go that way, but it does work.
Here is some old code I used when a child form was allowing the user to select a date: (it is in vb.net 1.1, sorry if that is the wrong version and code language)
Private Sub closewindow(ByVal indate As Date)
Dim myScript As New StringBuilder
With myScript
.Append("<script>")
.Append(Environment.NewLine)
'This code sets the correct field on the opener form
Dim tmpstr As String = "self.opener.document.forms[0]." + CStr(Session("DatelookupField"))
.Append(tmpstr)
.Append(".value = """)
.Append(indate.ToShortDateString)
.Append("""")
.Append(Environment.NewLine)
'focus the opener form
.Append("self.opener.focus()")
.Append(Environment.NewLine)
'Close the calendar window
.Append("self.close()")
.Append(Environment.NewLine)
.Append("</script>")
Page.RegisterStartupScript("close window", .ToString())
End With
End Sub
In the parent form when the button was clicked to open the new child form I set the session variable:
Session("DatelookupField") = "txtBoxWeekending"
Maybe not the best code, I did write it quite a few years ago, but it does work.
Ben
|
|
|
|
|
I'm having a problem with textboxes not displaying as specified on Pocket PC devices.
Regardless of the specified Width, all Textboxes display as the same size.
<pre>
<asp:TextBox id="txtIntials" tabIndex="5" runat="server" Width="48px" Height="24px" Font-Bold="True"></asp:TextBox>
<asp:TextBox id="txtPedigree" runat="server" Font-Size="X-Small" Width="320px" Enabled="False"></asp:TextBox><BR>
</pre>
Is this expected behavior?
Thanks
Travis
|
|
|
|
|
Hello,
i need asp.net code for getting a countryname using ipaddress...
i know how to get a ipaddress of remote machine. But i want get countryname,cityname,countryflag for using that ipaddress....
If Any one know reply me as soon as possible...
Thank you.....
pain gives gain
|
|
|
|
|
There is a formula which multiply each dot value of IP and then adds it up, This value is compaired with lookup data to find out the country name. Don't know if city is also possible? Search it in google or live.com you will find the result.
Thanks
|
|
|
|
|
How to upload file in asp.net 2.0 to server hard disk from client side and down load file
|
|
|
|
|
Drag nd Drop Html control input(file) nd in code behind write following code
string fn = System.IO.Path.GetFileName(YourfileName.PostedFile.FileName);
string SaveLocation = Server.MapPath("FolderName") + "\\" + fn;
YourfileName.PostedFile.SaveAs(SaveLocation);
Response.Write(fn + " Has been uploaded to " + SaveLocation);
Instead of "YourfileName" use de id of input(file) control nd FolderName is de name of de folder on server in which to upload de file.
i think it will solve ur problem.
|
|
|
|
|
You can use the file upload component use the and use the .SaveAs(filename) method to save at the server side.
Thanks,
|
|
|
|
|
in saving data in my module, instead of using connection wizard, i use this sql codes:
Dim str As String<br />
dbconnect = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Rara's project\grading.mdb")<br />
dbconnect.Open()<br />
str = "select count(*) from students where studname = '" & txtname.Text & "'"<br />
dbcommand = New OleDbCommand(str, dbconnect)<br />
If dbcommand.ExecuteScalar <> 0 Then<br />
MessageBox.Show("Already exists.", "Result")<br />
cleartxt()<br />
Else<br />
str = "Insert into students(studname, year, course) values ('" & txtname.Text & "', " & "'" & cmbyear.Text & "', " & "'" & cmbcourse.Text & "')"<br />
dbcommand = New OleDbCommand(str, dbconnect)<br />
dbcommand.ExecuteNonQuery()<br />
MessageBox.Show("Record Added.", "Result")<br />
dbconnect.Close()<br />
cleartxt()<br />
End If
but i have an error in the part there -"dbcommand.ExecuteNonQuery()"
a dialog box appear and it says:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
i guess the error there is the combobox that i used? because when i try to erase the "cmbcourse.text" and "cmbyear.text", it runs..but when i put it, there's an error....
how can i fix it???
please, help me!!!
|
|
|
|
|
Is the year filed in your database a text field, or a nyumeric one? If the latter, you need to remove the apostrophes around it in your sql statement.
If any of your courses have apostrophes in them, this too will break the code - use the replace function to replace all occurrences of apostrophes with double-apostrophes.
|
|
|
|
|
all my database field are text....
the apostrophes that are you saying are in my codes? So i need to remove it?
This is my code before:
str = "Insert into students(studname, year, course) values ('" & txtname.Text & "', " & "'" & txtyear.Text & "', " & "'" & txtcourse.Text & "')"
how can i remove it?
Like this?
str = "Insert into students(studname, year, course) values ('" & txtname.Text & "', " & " " & txtyear.Text & ", " & " " & txtcourse.Text & ")"
but when i do it, it is still dont running?
Can u please write the codes for that, so i can know which one is to be removed?
|
|
|
|
|
No - your original SQL statement is correct in as far as it goes, but will crash if any of your text inputs include apostrophes. Because SQL uses apostrophes to mark the start and end of text fields, another one occuring within a field causes problems.
To get round this, SQL accepts two consecutive apostrophes as marking not the end of the text field but an apostrophy within it - thus if your txtcourse.text = "smith's" the SQL statemt would fail, "smith''s" would be accepted.
To take acount for this in all cases, simply use the replace method to replace all apostrpohes within text fields with double apostrophes - thus:
str = "Insert into students (studname, year, course) values ('" & txtname.Text.Replace("'", "''") & "', '" & txtyear.Text.Replace("'", "''") & "', '" & txtcourse.Text & "')"
cheers
Fred
|
|
|
|
|
Dear all,
i am using asp.net2.0 , C#
i want to know how to create itemtemplate at run time.
please help
thanks
imran khan
|
|
|
|
|
create class that implements interface System.Web.UI.ITemplate
class MyItemTemplate : ITemplate
{
public void InstantiateIn(Control container)
{
// add any controls you wish into container.Controls[] collection
}
}
TemplateField myTemplateField = new TemplateField();
myTemplateField.ItemTemplate = new MyItemTemplate();
myGridView.Columns.Add(myTemplateField);
hope that helps.
Pilo
|
|
|
|
|
Hello Everyone,
I've to run mp3 or .rm songs in my web page
how can it be possible ..............
Suggesttttttttttttttttttttt Me...................
|
|
|
|
|
> I've to run mp3 or .rm songs in my web page
1997 called, they want their HTML back.
I vaguely remember something about the embed tag. You might have to look at that if there isn't anything that ASP.NET itself provides for this purpose,
|
|
|
|
|
i have a checkboxlistitem.where let say A,B,C,D,E are the items in that control.
and below that 5textboxes are there named as textbox1,textbox2......textbox5.
initiallay all textboxes are disabled.now i want when ever i select A the corresponding checkbox should be enable i.e textbox2.
and likewise if i select B then textbox2, if Dthen textbox 4.likewise.
what will be the vb.net code for it.
|
|
|
|