|
Hi Friends,
I have created a webservice using ASP.net 2.0 wchich sends employees details as a dataset.
on client side i am using classical asp to access that
Dim xmlhttp
Dim DataToSend
DataToSend="companyid="& cstr(Session("companyid"))
Dim postUrl
postUrl = "http://localhost:1286/LoginServices/Service.asmx/GetUserList"
Set xmlhttp = server.Createobject("MSXML2.XMLHTTP")
xmlhttp.Open "POST",postUrl,false
xmlhttp.setRequestHeader "Content-Type", _
"application/x-www-form-urlencoded"
xmlhttp.send DataToSend
dim dataReturned
dataReturned=xmlhttp.responseText
when i use Response.write(dataReturned) it prints data.
My problem is That I want to show data as a formatted text and also want to give user an option to edit the emplohees information and save back to the server. I want to show records in a table but it seems when it returns data its a single string.
I dont know if my apporach is wrong or right.
If any one knows how to create a formatted text or how to put that data into an xml file please help me
thanks
Naveed Kamboh
|
|
|
|
|
Dou have access to the code of the webservice? Then wrap the results in XML-Tags. The XML-Tag-Names are irrelevant, but I should be a wellformed XML-Stream you returned.
Now you can parse the result stream in CodeBehind before your Response.Write-Call OR clientside with JS using JS-DOM.
Regards
Stephan
\\\| \\ - -
( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
|
I've added allowsorting="true" to my gridview properties, but I still don't get clickable headers. What am I missing?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Which data source you are using?
If you are bounding columns in design time then you need to tell sortexpression there.
you can use column name as sort expression. Also bear in mind that DataSet gives builtin sorting and paging options.
Naveed Kamboh
|
|
|
|
|
I don't have an answer, but when I saw your name on a post in a .net message board I almost crapped my pants! I thought you hated and reviled all things .net and avoided it like the plague or are there more than one Outlaw programmers around here?
|
|
|
|
|
I developed a site with a reserved section based on roles, when I try to access that page i got redirected correctly to the loginpage and on the address bar i see
the ReturnUrl containig the address to point to:
http://localhost/SiteName/login.aspx?ReturnUrl=%2fSiteName%
2fadministrator%2fdefault.aspx
administrator/default.aspx is the page I have to reach
I authenticate succesfully but when the following instruction executes without error:
FormsAuthentication.RedirectFromLoginPage(user, chkRemember.Checked)
i still remain in the same page, only user and pwd disappear
the address in the bar is still the same....
otherwise if i submit incorrect user o pwd I got an error that indicates the redirect correctly fails:
If AuthenticateUser(userEncoded, pwdEncoded, roles) Then
FormsAuthentication.RedirectFromLoginPage("@" & ruoli, chkRemember.Checked)
Else
lblLogin.Text = "Access denied!"
End If
Any idea?
Thanks
Alessandro
|
|
|
|
|
|
i've a win2003 server and clients in a lan.
i want to make a asp.net page.
if users open the page,the username appears in the textbox automaticaly.
|
|
|
|
|
This bit of code (visual studio 2005) will retrieve the logged in user name:
My.User.Name
I'm sure VS2003 and VB6 can accomplish this too, but you'll have to search for the actual syntax.
You could also store the user name in a cookie that gets saved on the computer. This would remember the last person who logged into the asp.net page on that computer, instead of whom ever is currently logged in... Code would look something like this:
'To Set the Cookie:
Response.Cookies("UniqueCookieName").Value = txtUserName.Text
Response.Cookies("UniqueCookieName").Expires = Now.AddYears(50)
'To Retrieve the cookie:
If Not Request.Cookies("UniqueCookieName") Is Nothing Then
txtUserName.Text = Request.Cookies("UniqueCookieName").Value
End If
Hope this helps.
|
|
|
|
|
hi,
i have developed an application using Asp.net and C#. But the when i try to login for the first time it redirect the page to login page instead of going to the second page. but it allow to move for the second time
|
|
|
|
|
You'll get better response to your queries if you
1) Don't ask the same thing twice within minutes
2) Don't mark it URGENT
only two letters away from being an asset
|
|
|
|
|
Hi,
Don't Repost the Same Question.
With Regards
Satips
|
|
|
|
|
If you are asking how to setup which page starts first, right click on the page in the Solution Explorer and select "Set as Start Page"
If that is not your question, could you please explain your problem with a little more detail?
|
|
|
|
|
another Solution
Onto web.config
<br />
<forms loginUrl="validate_user.aspx" protection="All"><br />
Onto validate User
<br />
if(user and password are valid)<br />
{<br />
Response.Redirect("index.aspx");<br />
}<br />
keep Learning and you never will be out of date...
|
|
|
|
|
hi,
i have developed an application using Asp.net and C#. But the when i try to login for the first time it redirect the page to login page instead of going to the second page. but it allow to move for the second time. Plz help me its urgent
|
|
|
|
|
Is there any way of getting around using the special characters inside the password field?
|
|
|
|
|
You might want to look at the CreateUserWizard.PasswordRegularExpression property.
|
|
|
|
|
My datagrid is bind with a datasource.
Now I need to add a number of rows dynamically to the datagrid, where rows contains controls. How to do this?
Help kindly appreciated.
Thanks.
The Phantom.
|
|
|
|
|
|
Hi everybody
I have datalist who have it inside ImagineButton.
protected void list_SelectedIndexChanged(object sender, EventArgs e)
{
int name=list.SelectedItemStyle.te
}
<asp:datalist id="list" runat="server" onselectedindexchanged="list_SelectedIndexChanged">
<itemtemplate>
<asp:imagebutton id="ImgBtnBanner"
="" tooltip="<%#Eval("Title") %>" imageurl="<%#Eval("ImageUrl") %>" postbackurl="<%#@"http://"+Eval("LinkUrl") %>" runat="server" cssclass="ImgBanner" alternatetext="<%#Eval("Id_banner") %>">
How can catch the clicked button.Please help me.
Good bye and hava a nice day.
when i want to read something good just seat and type it
|
|
|
|
|
I am looking for a code in javascript which does not allow decimal values in the Telephone No. field(i.e textbox)
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
function KeyCheck(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (((keycode>47) && (keycode<58) ) || (keycode==8)) { return true; }
else return false;
}
You can use this function for keypress so that it will not allow u to put any characters but only numeric.
If you have a HTML control then call this function by onkeypress="return KeyCheck(this,event);"
Else on server side code write TxtPhone.Attributes.Add("onkeypress","return KeyCheck(this,event)");
Vicky
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
Thanks for your help....
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
how can i create a session in asp.net2005 using c#
dcjoshi2
|
|
|
|
|
Every time an user open your site on a browser window, it create a session automatically
Create a session variable with the user Id
string userId = (to consult the database)....
Session["userId"] = userId;
Check the session State
string stateSession = Session.Mode.ToString();
write these lines on all onload process pages in order to check if the session dont time out
<br />
try<br />
{<br />
string isAlive = Session["userId"].ToString();<br />
}<br />
catch(Exception)
{<br />
Response.Redirect("error.aspx");
}<br />
Ojala sea lo que buscas
i hope it was what you looking for
keep Learning and you never will be out of date...
|
|
|
|