|
Exelioindia,
Yes; like I said on my reply, it might be a different approach to solve this issue but this worked for me.
|
|
|
|
|
If you have put the hidden field inside the form that you are posting, you can get the value using Request.Form.
---
b { font-weight: normal; }
|
|
|
|
|
it will be generated as a System.Web.UI.HtmlControls.HtmlInputHidden and you can acess (get/set) its value using: fieldName.value.
David
|
|
|
|
|
dgonzale wrote: it will be generated as a System.Web.UI.HtmlControls.HtmlInputHidden and you can acess (get/set) its value using: fieldName.value.
Only if you add the runat and id properties to the element. Otherwise the element is treated as plain text by the server.
There is no need to make a server element of it to access the value that it sends in the post.
---
b { font-weight: normal; }
|
|
|
|
|
Ooops! Yes you're right, i forgot about the id property, thanks Guffa.
David
|
|
|
|
|
Hi to all,
I need to POST To A Different Site in asp.net (vb.net) after users enter required data filds in a form. Specifying action (containing the URL of the site) and the target (_blank) does not help, it opens my site again.
I’ll appreciate any help,
Regards,
David
|
|
|
|
|
in the form's action specfiied fully qualified URL of the page which it has to call such as
<form method="post" action="http://callingsite.com/authen.aspx">
and verify the field/value names that you are passing to the page are similar or not.
If this one not a solution, be specific of what are you doing and how you are doing it?
|
|
|
|
|
Hi Rao, thanks for such a prompt reply.
I tryed this already and it opened my application again on the new browser window.
<form id="Form1" method="post" runat="server" action="http://callingsite.com/authen.aspx" target="_blank">
Fields were identified as requested by the target site according to a sample HTML form I found. I also tryed with plain HTML input objects an a plain HTML form and it worked, since I'm inheriting from a base form class, this will not work.
David
|
|
|
|
|
remove runat="server" attribute
|
|
|
|
|
Like I said, I tryed using a PLAIN HTML form and it worked but this will prevent the rest of the objects in the form to work, besides I'm inheriting the form from a form base class and this won't work either .
Can I have a ASP.NET form object and a PLAIN HTML form at the same time? I would wrap any object inside the ASP.NET form and the 2 other fields inside the HTML form.
|
|
|
|
|
|
Thanks Jorsh, I'll check the link and I'll get back to you with the outcome if positive.
|
|
|
|
|
Hi
if any body could help in solving my problem.
my problem is when i am clicking hyper link in asp.net to open a pdf file,it unable to open why?
even when i am try to open using window.open method using javascript,it unable to open.displaying a small image on inernet explorer on the left side saying done when i click that it display a box saying Access Denied.
plz help me
hussamuddin
|
|
|
|
|
What do you want to do exactly?
Whether you want to display the file or download.
If you want to display the .pdf on the client side and there is a probability that user may not install it on system. In that case add download acrobat-plug-in.
For downloading ..........
Dim dwnURL As String = CType(sender, LinkButton).CommandArgument<br />
If dwnURL.Length > 0 Then<br />
Dim filepath As String<br />
filepath = System.Web.Hosting.HostingEnvironment.MapPath(dwnURL)<br />
'Check whether the download file exists or not. if does not exists, send auto-generated email to the admin specificying<br />
'the at which URL it occured and the file which is not found.<br />
If Not System.IO.File.Exists(filepath) Then<br />
Session("FNN_AbsolutePath") = filepath<br />
Session("BackURL") = Request.UrlReferrer<br />
Response.Redirect("~/BrokenLink.aspx")<br />
End If<br />
Dim onlyFileName As String = System.IO.Path.GetFileName(filepath)<br />
' Open File<br />
If Not System.IO.File.Exists(filepath) Then<br />
' popFileNotFound.Link = "" ' ResolveUrl("~/admin/email.aspx")<br />
'popNewMail.Title = GetGlobalResourceObject("mail", "newMail")<br />
' popNewMail.Message = String.Format(GetGlobalResourceObject("mail", "newMailMessage"), _newMailCount.ToString())<br />
popFileNotFound.AutoShow = True<br />
popFileNotFound.Visible = True<br />
Exit Sub<br />
End If<br />
Dim fs As New IO.FileStream(filepath, IO.FileMode.Open)<br />
Dim bytes(fs.Length) As Byte<br />
fs.Read(bytes, 0, fs.Length)<br />
fs.Close()<br />
' Send the file as Response<br />
Response.AddHeader("Content-disposition", "attachment; filename=" & onlyFileName)<br />
Response.ContentType = "application/octet-stream"<br />
Response.BinaryWrite(bytes)<br />
Response.End()<br />
End If
|
|
|
|
|
thanks for replying my mail
the problem what i am getting is i was unabel to open a pdf file link from internet explorer i am using winxpsp2 with IE sp2 when i am clicking the hyper link it unable to open the pdf file.Even it unable to open with window.open method.i used the above method i am getting a error "Thread was being aborted." but the problem is my page search is been stoped with blank,after opening the pdf.
hussamuddin
|
|
|
|
|
I am having a user in Active directory(eg user1) with password(eg user1).If this user changes the password(eg from user1 to u1).Then attempt to change it again he shuld not be allow to use the previous passord(ie Changes from u1 to user1 then Error.if from u1 to uuuu1 then shuld be allowed to change).In short i want to store the password every time the password change take place(ie maintain password history length to 3 in active directory).How can i do all this via C# coding? Plz help me to find a solution to this???
sheets
|
|
|
|
|
|
hi all i want to make web application that is restricted to only four pplz i mean 4 computer and does not allow more than that,and post messages to these visitors after certain time intervals.
Tasleem Arif
|
|
|
|
|
Hi!
I am building a web site in ASP.Net and C# for playing virtual stock game. A registered member
will be given 1 M $ to buy and sell bond,stock...But i am a beginner and have not experience
in this field so i really need help about:
-How to automatic retrieve stock information from a website(eg finance.yahoo.com) and save
it into database.
-How to execute transaction
-Any resource, reference, advice, information about my project.
Thanks in avance and sorry for my bad english.
Best Regards
giaptd
|
|
|
|
|
I develop a web page thru ASP.NET2005 using HTML,CSS. whn i run into these pages Internet Explorer thn they r perfect into formatting but whn I run into these pages ino Mozilla FireFox and Netscape thn they r unformatted.so how can i prevent this sititution.
dcjoshi2
|
|
|
|
|
hi,
This is not the problem of the ASP.NET, this is the problem with the HTML and may be the CSS, because many functionalities supportd by IE are not supportd by other. Also IE can be satified with minimum requirment, but not he Mozilla.To over come this problem you has to first understand the html and use the functionalities suppored by all
Know is Drop, Unknown is Ocean
|
|
|
|
|
If a page doesn't look the same in IE6 and Firefox, it's almost always shown correctly in Firefox.
You have created a page that uses the bugs and quirks of IE6 to make it look the way that you want. As other browsers don't have those bugs and quirks they won't misinterpret the code, so the page looks different.
Here you can read about the bugs: Position is everything[^].
---
b { font-weight: normal; }
|
|
|
|
|
Sir,
I want to check whether sql server is installed or not on the machine before making the connection.
PLease help
Thanks
|
|
|
|
|
Hi
I want to display time and date it showing in my system
But when i upload to server it is showing server time
How can i display Indian time
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
using System;
using System.Globalization;
using System.Threading;
public class FormatDate
{
public static void Main()
{
DateTime dt = DateTime.Now;
// Sets the CurrentCulture property to U.S. English.
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
// Displays dt, formatted using the ShortDatePattern
// and the CurrentThread.CurrentCulture.
Console.WriteLine(dt.ToString("d"));
// Creates a CultureInfo for German in Germany.
CultureInfo ci = new CultureInfo("de-DE");
// Displays dt, formatted using the ShortDatePattern
// and the CultureInfo.
Console.WriteLine(dt.ToString("d", ci));
}
}
Know is Drop, Unknown is Ocean
|
|
|
|