|
Try this:
<form method="post" name="customerlinkform">
Then put the customerlinkform.submit() in a button.
Doing so should hide the querystring.
|
|
|
|
|
hi,
When the source page uses the HTTP POST action to navigate to the target page, you can retrieve posted values from the Form collection in the target page. Note that you can get only the post values; you cannot read the values of arbitrary controls on the page.
To get the values of controls from the source page in another application
1. In the source page, include a form element that contains HTML elements (such as input or textarea) or ASP.NET server controls (such as TextBox or DropDownList controls) that post values when the form is submitted.
2. In the target page, read the Form collection, which returns a dictionary of name/value pairs, one pair for each posted value.
The following code example displays the ID and value of every posted control in the source page and displays the posted values in a label named Label1.
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
Dim displayValues As New StringBuilder()
Dim postedValues As NameValueCollection = Request.Form
Dim nextKey As String
For i As Integer = 0 To postedValues.AllKeys.Length - 1
nextKey = postedValues.AllKeys(i)
If nextKey.Substring(0, 2) <> "__" Then
displayValues.Append("<br>")
displayValues.Append(nextKey)
displayValues.Append(" = ")
displayValues.Append(postedValues(i))
End If
Next
Label1.Text = displayValues.ToString()
End Sub
For more help refer following link...
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi,
There is an initiative to upgrade browser on desktop from IE 6 to IE 8. As part of this initiative, all web based applications need to be remediated/tested in order to ensure that they work correctly in IE8. Please let me know on how we can identify the impacted web applications due to this initiative.
Please share if there is any standard approach or tools to address such requirement.
Kindly redirect me to any tool which will solve this purpose.
Thanks in advance.
Regards,
Riz
|
|
|
|
|
There should no impact Ideally when you upgrade your browser if you(and all your 3rd party tools) have not used any depreciated javascript code.
But, still testing the javascript part only should be sufficient. Moreover, you might get a few alignment issue depends on the way you have written your html code.
Hope this will help.
|
|
|
|
|
|
Hallo, I am completely new in ASP.Net and I want to pass the data from a simple SELECT into the Attributes of an Object. The Class has similar attributes as the DB-Table. Where should I look to learn how to do that? Is there already a standard procedure (presumably Microsoft's) for such a process?
Thanks in advance.
modified on Monday, February 7, 2011 2:18 PM
|
|
|
|
|
There is no standard procedure for this. You could do it by hand, such as:
<br />
SqlDataReader dr = ...<br />
while(dr.Read())<br />
{<br />
MyObject obj = new MyObject();<br />
obj.Property1 = dr["Property1"];<br />
...<br />
}<br />
or use an Object Relational Mapping tool such Entity Framework, or create your own
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Dear all,
In my application i have first Datecontrol(using javascript) next followed by 2 dropdowns and finally uploader control from CuteWebUI.AjaxUploader.dll(its works like user control)
I am CuteWebUI.AjaxUploader.dll for uploader control which will show progress bar + time elapse while uploading a file it is showing postback
In IE it is working .(First i need to select date from Datecontrol followed by 2 dropdowns then need to select uploader button (like browse) and save finally)
But if the same page if i executed in Mozilla i am unable to open Datecontrol.But here i am facing one problem after selecting a file through uploader button showing postback then if i click datecontrol again now it is opening datecontrol.I am having doubt y datecontrol is not opening for first time.
Can any one help on these?Here is code for your reference.
uploadDocumentPopUp.aspx
------------------------
<%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="cc2" %>
<cc2:Uploader ID="Uploader1" runat="server" InsertText="Upload File (Max 10M)" OnFileUploaded="Uploader_FileUploaded">
<ValidateOption MaxSizeKB="10240" AllowedFileExtensions="jpg,jpeg,tiff,txt,doc,pdf,xls,rtf"/>
</cc2:Uploader>
uploadDocumentPopUp.aspx.cs
---------------------------
protected void Uploader_FileUploaded(object sender, UploaderEventArgs args)
{
Uploader uploader = (Uploader)sender;
fileName = args.FileName;
string fileNameWithOutExt = Path.GetFileNameWithoutExtension(fileName);
string fileExtension = Path.GetExtension(fileName);
fileNameWithOutExt += DateTime.Now + fileExtension;
fileNameWithOutExt = fileNameWithOutExt.Replace("/", "");
fileNameWithOutExt = fileNameWithOutExt.Replace(":", "");
fileNameWithOutExt = fileNameWithOutExt.Replace(" ", "");
ViewState["fileName"]=fileNameWithOutExt;
args.CopyTo(Server.MapPath(@"..\Documents\" + fileNameWithOutExt));
//alertMessage.Alert.Show("Document got uploaded please click upload button");
Response.Write("<script>alert('Document got uploaded successfully please click upload button!');</script>");
}
thanks in advance,
Subbu.
|
|
|
|
|
Hi,
I created a class library to do some logging and this class library need a configuraiton file to do some initialization work. I set the configuraiton file's build action to "Content".
Then I add reference to this class library from a asp.net application project. After build, the class lirary and the configuration file were put the output folder "bin".
As I begin to get the configuration files address in running, there are some errors occur because I ca't correctly locate the configuration file's address.
Please help: how could I get the configuration file's path?
thanks,
|
|
|
|
|
Hi!
You need to use the executing assembly's configuration file even for the library.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi,
Where is the appropriate lifecycle step we can introduce JavaScript execution in the page? can anyone please explain?
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Hi,
Friends i have a grid view with some coulmns like Name,Phone no etc with Edit,Delete column in grid view.
I click a row in grid view to Edit,it goes another page where i can edit all fields .Once i update i redirect the page to gridview.
I want the grid view to remain in that particular page say 4 of the grid view ie in which page i had edited the record.
Guhananth.S
|
|
|
|
|
Member 3222264 wrote: I click a row in grid view to Edit,it goes another page where i can edit all fields .Once i update i redirect the page to gridview.
Why do you do that? Its a very bad UI and not good usability wise.
Have a look at this article:Editable Nested GridView (All-in-One)[^]
This contains all the sample needed that can direct you...
|
|
|
|
|
Hi!
You should try to use a ModalPopupExtender from Ajax Toolkit to show the data that you want to edit.
This way your page will not change state and the view will remain as it was when you clicked on the row.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi everybody.
I'm trying to learn Javascript and Ajax, and I'm kind of lost with this thing.
The Idea is to have two dropdownlist on the page, the first one loads data from an xml file with, for example, a list of countries, and after selecting a country the second one loads towns of the selected country.
The idea is really simple, I'm following a manual but I can't make it work.
Can somebody help me please?
This is the code I write on an aspx file (VS2005), taken from the manual.
I get an error on the line
var provincias = documento_xml.getElementsByTagName("provincias")[0];
it seems that is returns null...
I'd appreciate if you could send me a link where I can find a similar idea, that I can study. Thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/
xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ejercicio 16 - Listas desplegables encadenadas</title>
<script type="text/javascript">
var peticion = null;
function inicializa_xhr()
{
if (window.XMLHttpRequest)
{
return new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
function muestraProvincias()
{
if (peticion.readyState == 4)
{
if (peticion.status == 200)
{
var lista = document.getElementById("provincia");
var documento_xml = peticion.responseXML;
var provincias = documento_xml.getElementsByTagName("provincias")[0];
var lasProvincias = provincias.getElementsByTagName("provincia");
lista.options[0] = new Option("- selecciona -");
for(i=0; i<lasProvincias.length; i++)
{
var codigo = lasProvincias[i].getElementsByTagName("codigo")[0].firstChild.nodeValue;
var nombre = lasProvincias[i].getElementsByTagName("nombre")[0].firstChild.nodeValue;
lista.options[i+1] = new Option(nombre, codigo);
}
}
}
}
function cargaMunicipios()
{
var lista = document.getElementById("provincia");
var provincia = lista.options[lista.selectedIndex].value;
if(!isNaN(provincia))
{
peticion = inicializa_xhr();
if (peticion)
{
peticion.onreadystatechange = muestraMunicipios;
peticion.open("POST", "http://localhost/Modal/cargaMunicipiosXML.php?nocache=" + Math.random(), true);
peticion.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
peticion.send("provincia=" + provincia);
}
}
}
function muestraMunicipios()
{
if (peticion.readyState == 4)
{
if (peticion.status == 200)
{
var lista = document.getElementById("municipio");
var documento_xml = peticion.responseXML;
var municipios = documento_xml.getElementsByTagName("municipios")[0];
var losMunicipios = municipios.getElementsByTagName("municipio");
lista.options.length = 0;
for(i=0; i<losMunicipios.length; i++)
{
var codigo =
losMunicipios[i].getElementsByTagName("codigo")[0].firstChild.nodeValue;
var nombre =
losMunicipios[i].getElementsByTagName("nombre")[0].firstChild.nodeValue;
lista.options[i] = new Option(nombre, codigo);
}
}
}
}
window.onload = function()
{
peticion = inicializa_xhr();
if(peticion)
{
peticion.onreadystatechange = muestraProvincias;
peticion.open("GET", "http://localhost/Modal/cargaProvinciasXML.php?nocache="+Math.random(), true);
peticion.send(null);
}
document.getElementById("provincia").onchange = cargaMunicipios;
}
</script>
</head>
<body>
<h1>Listas desplegables encadenadas</h1>
<form action="cargaProvinciasXML.php">
<label for="provincia">Provincia</label>
<select id="provincia">
<option>Cargando...</option>
</select>
<br/><br/>
<label for="municipio">Municipio</label>
<select id="municipio">
<option>- selecciona una provincia -</option>
</select>
</form>
</body>
</html>
PS: The information of tows and countries is stored on two php files with this format:
CargaprovinciasXML.php
<?php
header("Content-Type: application/xml");
$provincias["01"] = "Álava/Araba";
$provincias["02"] = "Albacete";
...
$provincias["49"] = "Zamora";
$provincias["50"] = "Zaragoza";
foreach($provincias as $codigo => $nombre) {
$elementos_xml[] = "<provincia>\n<codigo>$codigo</codigo>\n<nombre>".$nombre."</nombre>\n</provincia>";
}
echo "<provincias>\n".implode("\n", $elementos_xml)."\n</provincias>"
?>
CargaMunicipiosXML.php
<?php
header("Content-Type: application/xml");
$municipios["01"]["0014"] = "Alegría-Dulantzi";
$municipios["01"]["0029"] = "Amurrio";
...
$municipios["51"]["0013"] = "Ceuta";
$municipios["52"]["0018"] = "Melilla";
$provincia = trim($_POST["provincia"]);
$losMunicipios = $municipios[$provincia];
foreach($losMunicipios as $codigo => $nombre) {
$elementos_xml[] = "<municipio><codigo>$codigo</codigo><nombre>".$nombre."</nombre></municipio>";
}
echo "<municipios>\n".implode("\n", $elementos_xml)."</municipios>";
?>
|
|
|
|
|
hi, iam using asp.net with c#,
i want to remove browse text and decrease the size browse button of fileupload control in asp.net
i want to place like dot .... like symbol in place of browse text and decrease the size of browse button .
can you give example which helps me
|
|
|
|
|
developerit wrote: i want to place like dot .... like symbol in place of browse text and decrease the size of browse button .
You cannot!
Instead, you need to develop your own control or use a button having a file upload control hidden behind that triggers the browse button.
P.S.: I have seen you asking so many question that can be easily searched if use CodeProject Search only (not even Google!)
|
|
|
|
|
Hai all,
I need to open save as dialog in ultrawebgrid hyperlink cell click and i need to save the document
Can anyone help me plz..
Thank you
|
|
|
|
|
Hi everyone,
I created a ajaxenabledwebsite using VS2005 and using obout suite also with this...It was working well ..Last day onwards ,.aspx pages takes much time to load and status bar shows "loading designer..." .Even if it loaded,editing the markup is not possible and
F10 and F11 keys are not working for debugging..
Help me ..
Thanks in advance,
|
|
|
|
|
Hi,
How to get the control height using javascript...
usiing document.getelementbyid('x')...
|
|
|
|
|
Please read, How to get an answer to your question[^] and pay attention to item #3. You have a history of not following this guidance. "Height" and "iframe" and "Combobox" and "SlideCtrl" and more, these are short but not descriptive at all. Please follow the guidance in the future.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Apart from what Mark has said, had you done a Google, or just tried a little yourself, you must know that 'Height' is a property and would depend on controls. Few directly expose them and few expose them using Stylesheets.
|
|
|
|
|
Hi ,
i have an iframe inside an usercontrol..and just besides iframe there is an hyperlink and i have a link inside iframe(onclick of that im performing _dopostback(linkidwhichisiniframe,'')).
so my concern is when i click the hyperlink which is adjacent to iframe
i want to perform _dopostback inside iframe....
Please let me know...
|
|
|
|
|
Make a button with display:none inside the iframe. Make the onClientClick of the adjacent link a javascript function that calls the click of that hidden button. If you want specific info sent in the dopostback then you need to give far more details.
|
|
|
|
|
thanks for ur answer,but i need to have only link in the iframe and i need to call the _dopostback of the link which is inside the iframe by clicking on the link which is adjacent to iframe....
ill expalin why i want to do like that..
actually when i click on the link which is adjacent to the iframe initially ie after just the page load..the Div which contains the iframe opens..(initially the div will be in closed state)then the link which is present inside iframe is not aligned properly ie it touches the bottom border of the iframe,and when i click on the link which is inside iframe it actually firing _dopostback inside iframe so aligning properly in the middle of the iframe...so my concern is the moment when i click the link which is adjacent to iframe that time itself the alignment of link inside iframe should be proper...
|
|
|
|