|
There is a simple example on that link I gave you. Work your way through that tutorial and you will have the ajax tools you need. I presume you already know how to do the database bits...
|
|
|
|
|
I have a problem ...
I have to add controls to the page dynamically under a certain tag .The response which Iam getting from the database is in the form os HTML string.(on selection of a dropdown) something like:
<asp:textbox id="" .......="" xmlns:asp="#unknown">
uc:codelook id="" addedproperty="123" .....=""
<asp:label ....="" xmlns:asp="#unknown"> etc etc ....
Now Earlier I had been using
--->control xyz = ParseControl(HTMLString)
--->page.findcontrol("dIV_Tag") to get the specified div where the controls have to be added in an object objDIV.
---> and finally objDIV.addControl(control);
Now the problem comes in case of uc: tag which is a ascx user control .earlier uc tag was coming undefined for which i had add the namespace like <@register .....> to the the HTMLString due to which that prob was resolved but now the next problem which is coming is of the child controls which are being used under the ascx.
cause under the setter property inside the codebehind of ascx it was like :
public string AddedProperty
{
tt1.Attributes.Add("addedProperty", value );
}
tt1 is coming as undefined which is a child control --a textbox inside that usercontrol.even tried to set the child property from ascx thru inline coding by making a getter of the same property at code behind .
but again the value of addedProperty= "123" is not being set for child control.
What should be done ?Please suggest something as its urgent.
<uc:codelook id="" addedproperty="123" .....="" xmlns:uc="#unknown">;
modified on Monday, November 17, 2008 6:09 AM
|
|
|
|
|
hello,
I'M Ssnding some parameters to an url which display for me an XML file. i just want to need how to read that XML page in order to use that data in a table.it's not reading an existing xml file,it's not saving somewhere it's just in that url.
i'm new in XML, any help will be extreamly apreciated, thank you in advance
|
|
|
|
|
hi michael,
You can load that XML into an XMLDocument and iterate through the nodes,use xpath expressions and get the data.
Regards
surender
|
|
|
|
|
hi surrender,
thank you for your answer , here is how am i sending the parametrers via post method
<form method="POST" action="someURL.php">
<input type='hidden' name='serial' value='a' >
<input type='hidden' name='transactionid' value='b' >
<input type='submit' name='submit' value='submit'>
</form>
the someURL.php contain the XML file after sending its parameters.
where should i put that URL in the code, could you please give me a small example
thank you so much
|
|
|
|
|
sorry i didn't get u....
r u submitting postdata??
if yes provide the format of the post data.
if you want to submit post data you can create a weburi using webrequest object
and set the parameters like
WebRequest req = WebRequest.Create("URL to be accessed");
req.Method = "POST";
req.ContentType = "text/xml";
string str = "POST DATA";
StreamWriter sw = new StreamWriter(req.GetRequestStream());
sw.WriteLine(str);
sw.Close();
WebResponse res = req.GetResponse();
and res will contain response from the accessed URL.
Regards
surender
|
|
|
|
|
i'm so sorry i thing i missed explained here is the detail
i developping a sim card website so users could enter and check calls they made (call history) .
i have to send PARAMETERS (date, login username and password) to a specific url. when i'm redirecting to that url an xml file is displayed (here is URL u can check it "https://www.xfone.co.uk/mobile/CdrsView.php")
but of course i can't show this page to the user i have to retreive that data to a table.
hope that will give you a clearer idea.
sorry for the miss-understanding
regards
michael
|
|
|
|
|
Could you simply provide an xslt stylesheet with the xml page to have it render as you like?
|
|
|
|
|
the page which contain the url is sent by another system another provider i don't have any control on it simply i get a xml page which i want to retreivem the data
regards
|
|
|
|
|
OK, so you can use the code posted above to read the XML into an XMLDocument on the server side - you should be able to bind this to a grid...
|
|
|
|
|
ok, thank you for your time
|
|
|
|
|
dear surrender in the code above where could i specify the parameters value??
|
|
|
|
|
hi micheal,
in the code given refer
string str = "POST DATA";
here replace "POST DATA" with approriate parameters and their values.
Regards
surender
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
|
I use asp.net2.0. My web app is working fine in local system but in live the validators are not working. It raises some script error like ("Webform_postbackoptions is undefined"). also the page is redirected without any validations. any one pls help..
http://abhijeetsenan.blogspot.com
|
|
|
|
|
|
Checkout if you have any Custom HTTPModule that interfering with WebResource.axd handler
|
|
|
|
|
Hi
i created customed login page.
it has one label to show error message like "incorrect login".
it also has validation summary for username and password.
if user fill incorrect login name and password, the label will show "incorrect login".
if login name text box or password text box miss to fill, it will show only validation summary.
when i fill wrong data, it shows error msg.
and i ommit one textbox or both(username and password), it show both of validation summary and error msg(label).
i dont' want to show error msg if the page is not valid.
i also checked "if(page.Isvalid)".
but error msg(label )remain the same.
any suggestion pls?
i m using asp.net 2.0 and VS2005.
thanks in advance!
|
|
|
|
|
On Client side Labels are render as "SPAN" tag. So write a javascript method which set an empty string to the control on your button click
function clearControls()
{
var ctrl = document.getElementById('labelname');
if (ctrl != null)
{
ctrl.innerHTML = '';
}
}
Call the above method on button click
<asp:button id="Button2" runat="server" onclick="clearControls();" text="Button" xmlns:asp="#unknown" />
It would be great if you turn off the ViewStatate for this particular labe1.
|
|
|
|
|
thanks for your answer.
i will try.
|
|
|
|
|
So you want to only show the error message when the login is not in the database.
If they dont enter anything and click a button you want a required field validator to fire, is that correct?
Just add a required field validator to the control and that will check if the field contains a value.
|
|
|
|
|
thanks for your answer.
yes.
i alredy put required field validator.
if page is not valid, validation summary show error msg.
if page is valid and it is incorrrect login, lable will show "incorrect login".
after displaying label, it's not disappear.my problem is like that.
thanks again.
|
|
|
|
|
Hi..
now i can fix this problem.
in required field validator, enabledclientscript to false.
thanks.
|
|
|
|
|
Hi,
I m trying to hide the complete link that is send in emails to just a text say click here or anything but am not able to do it. The complete url is being displayed in the email.
Can anyone help me out.
Regards
Vijay V.
Yash Softech
|
|
|
|
|
Send your mail in HTML format and put it in an anchor tag, just like you would on a web page.
|
|
|
|