|
|
It's not quite that simple. The href="" link is usually only followed when the user clicks on it, and always uses the GET method, not POST.
You might also need to include any cookies that were received with the page when you make your request.
|
|
|
|
|
In effect the cookie problem is something I had completely neglected : to include this I guess I should load the "Referer"page first, extract the cookies associated with it and include them in the following GET that simulates the "href" anchor... am I right ?
|
|
|
|
|
Whether you should include a cookie or not depends on the domain and path specified in the cookie, the domain and path of the new page you are loading, the cookie lifetime, etc. Here's a link to RFC 6265[^] where you can read all about them.
I don't know how you are dealing with the contents of the href="" attribute, but you will have to cope with absolute links, relative links, <base href="..."> affecting the link location, and also deal with possible non-http links ("javascript:" and "mailto:" are two examples off the top of my head).
|
|
|
|
|
well I am quite confident that the href attribute of the anchor is always an absolute link.
Anyway I included the cookies and this time it seems I made a small step forward , at least now I'm not getting the http 500 error anymore, and I can get a response too (well it's a null string , but this is a detail .. ))....).
What puzzles me is that if I use the raw href url in a web browser call, for instance using IE, I get the requested page without any error... it doesn't seem to expect any cookies form a previous response .... But I am deeply ignorant as far as the web is concerned , I'm sure there's an answer to this.
What's important for now is that at least I can get past the WebResponse ....
Thanks for the support.
|
|
|
|
|
So, I have forms authentication setup with Web.config, an asp.net logincontrol, custom membershipprovider, custom roleprovider. Login custom, I used the templates of the logincontrol, but doubt that is the issue.
So here is what happens:
1. I surf to page where I need authorized access. I get redirected to login page, including the redirecturl in the querystring of the login address. So far so good.
2. I log in, my custom membership provider does the ValidateUser perfectly. So far so good.
3. Nothing happens after that. No exception, just nothing. Not so good.
Please help.
Below is relevant part in my Web.config:
<authentication mode="Forms">
<forms loginUrl="https://localhost:44301/login/Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="true"
slidingExpiration="true" defaultUrl="Default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<roleManager enabled="true" defaultProvider="KeetingRoleProvider">
<providers>
<clear/>
<add name="KeetingRoleProvider" type="Web.KeetingRoleProvider"/>
</providers>
</roleManager>
<membership defaultProvider="KeetingMembershipProvider">
<providers>
<clear/>
<add name="KeetingMemberShipProvider" type="Web.KeetingMembershipProvider"/>
</providers>
</membership>
|
|
|
|
|
You have to use FormsAuthentication.RedirectFromLoginPage method upon successful authentication for that...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
and where do I do this?
Thanks for taking your time to answer my silly(but necesarry) question.
|
|
|
|
|
On the login button click handler...
protected void LoginButton_Click ( object sender, EventArgs e ) {
bool bValid = AuthenticateLoginIdentity( );
if( bValid ) {
FormsAuthentication.RedirectFromLoginPage( );
}
}
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hi, I have a small table generated by a detailsview I would like to format:
there has to be a small white area between the cells in the table. I've tried a dozen things but no matter what I do,
I can't change the size or the color of the borders. They always stay at default border size and in black color.
I have pasted my code below. Please help.
<style>
#content_DetailsView{
position:absolute;
left:360px;
top:155px;
border-collapse:collapse;
margin-top:20px;
border-spacing:100px;
border-color:white;
border-style:solid;
border-width:50px;
}
content_GridView
{
margin-top:20px;
}
.gridviewheader th{background-color:blue;}
.gridviewheader th a{color:white;}
.gridviewrow{background-color:lightgray;}
.gridviewaltrow{background-color:darkgray;}
.gridviewselrow{background-color:blue;}
.detailsviewrow{background-color:grey;border-collapse:separate}
.detailsviewrow td{padding:0px;}
.gridviewpagerrow{background-color:blue;}
.gridviewpagerrow a{color:white;}
</style>
<table border="1" cellspacing="20" style="border-color:White;height:50px;width:125px;" id="content_DetailsView" rules="all">
<tbody><tr class="detailsviewrow">
<td>name</td><td>Alexandro Alexis</td>
</tr><tr class="detailsviewrow">
<td>address</td><td>3711 W Franklin</td>
</tr><tr class="detailsviewrow">
<td>email</td><td>alal@mma.yaleindustries.com</td>
</tr><tr class="detailsviewrow">
<td>phone</td><td>(559) 555-2993</td>
</tr><tr class="detailsviewrow">
<td>zipcode</td><td>93706</td>
</tr><tr class="detailsviewrow">
<td>city</td><td>Fresno</td>
</tr><tr class="detailsviewrow">
<td>customerid</td><td>1019</td>
</tr><tr class="detailsviewrow">
<td>statecode</td><td>
<span id="content_DetailsView_Label1">CA</span>
</td>
</tr><tr class="detailsviewrow">
<td colspan="2"><input type="button" onclick="javascript:__doPostBack('ctl00$content$DetailsView','Edit$0')" value="Bewerken"> <input type="button" onclick="javascript:__doPostBack('ctl00$content$DetailsView','Delete$0')" value="Verwijderen"> <input type="button" onclick="javascript:__doPostBack('ctl00$content$DetailsView','New$0')" value="Nieuw"></td>
</tr>
</tbody></table>
|
|
|
|
|
Nico Haegens wrote: #content_DetailsView{
border-collapse:collapse;
}
That's the line that's causing the problem. Change it to border-collapse:separate; , and your borders should appear.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That fixed halve the problem: there is indeed white space between the cells now, but the borders are still black, can you help me make them white? Already set border-color to white but that didn't help at all.
|
|
|
|
|
Try:
.detailsviewrow td{ padding:0px; border-color:white; }
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks so much, that did the trick! Much appreciated for quick responses.
|
|
|
|
|
Hi,
can you please check this webpage:
http://www.drmariagloria.com/[^]
if you resize the browser to smaller size then the hear will look like a half screen with the lighcyan color where it should be full width?
where is my mistake?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
You have to show us the css code for anyone to troubleshoot for you. I looked at source and there is 3 css files that may be affecting the way the elements are acting. If you use your browser's console you may be able to highlight an element that is acting up and see how it changes when resized. Try that.
vbmike
|
|
|
|
|
I am down to the last major task of my project and it is giving me griefs.
This block of code below allows me to load jquery datatable with data from a php file called getUsers.php filtered by userID.
$(document).ready(function() {
$("#example").dataTable( {
"sProcessing" : true,
"sDom":'T<"clear">',
"sJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear"><"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>',
"sAjaxSource" : "getUsers.php?loginName=<?php echo $user; ?>",
"sAjaxDataProp" : "",
"sDestroy" : false,
"sScrollXInner": "110%",
"fnServerData" : function(sSource, aoData, fnCallback) {
request = $.ajax({
"dataType" : "json",
"type" : "GET",
"url" : sSource,
"data" : aoData,
"success" : fnCallback
});
},
"aoColumns" : [
{ "mDataProp": "RequestID", "sWidth": "50px", sSortable: true,
"bSearchable": false,
"bSortable": false,
"fnRender": function (oObj)
{
return "<a target='tab' data-tab-name='#RequestDetails' data-tab-index='2' href='phpservices/details.php?requestID="
+ oObj.aData["RequestID"] + "'> " + oObj.aData["RequestID"] + " </a>";
}
},
],
})
Further down the code above is this line which adds hyperlink to the fieldname called RequestID:
questID"] + " ";
return "<a target='tab' data-tab-name='#RequestDetails' data-tab-index='2' href='phpservices/details.php?requestID="
+ oObj.aData["RequestID"] + "'> " + oObj.aData["RequestID"] + " </a>";
Finally, the code below allows us to display the details of user's selection in another tab:
$("#example").on("click", "a[target='tab']", function(){
var me = $(this);
var url = me.attr("href");
var tabName = me.data("tabName");
var tabIndex = parseInt(me.data("tabIndex"), 10);
$.get(url, function(data) {
var table = $( '<table cellpadding="4" cellspacing="0" border="1"/>' ),
tr = $( '<tr/>' ),
td = $( '<td/>' ),
th = $( '<th/>' );
tr.clone().html( th.text( 'ID' ) )
.append(th.clone().text( 'Date' ) )
.append(th.clone().text( 'Status' ) )
.append(th.clone().text( 'Assigned To' ) )
.appendTo(table );
$.each(data.aaData, function(i,v) {
tr.clone().html( td.clone().html(v[0]))
.append(td.clone().html(v[1]))
.append(td.clone().html(v[2]))
.append(td.clone().html(v[3]))
.appendTo(table);
});
$(tabName).html(table);
$("#tabs").tabs("option", "active", tabIndex);
}, 'json');
return false;
});
All of these work fine except one major problem.
When you click the requestID link, the hope is that the contents of details.php is displayed in requestdetails tab but it doesn't. It displays blank screen.
Does anyone know how to extract the contents of details.php file into a variable called aaData?
I will to be able to reference it and use it to load data into that other tab using:
$.each(data.aaData, function(i,v) {
...
...
Sorry if this is confusing, I can provide some clarity.
I am really desparate.
Thanks a lot in advance
|
|
|
|
|
What is new in Owin The Last few months.
Not owin it self but cool new componts
|
|
|
|
|
I just have one month for preparation,
1-what to prepare most part in asp.net and php to cover in one month.I have basic knowledge of asp php and c#.sql server 2005/08 ..quick way to prepare
2.what type of demo project should i make to show them ......
3-how to show my 2 years Gap in 12th , what to say to interviewer .. what should be the positive answer...
4- What should i prepare first PHP or ASP.NET
|
|
|
|
|
Akash Tripathi wrote: 3-how to show my 2 years Gap in 12th , what to say to interviewer .. what should be the positive answer...
How about the truth?
If you tell them a lie because you think it sounds better, then you've just lost any chance of getting the job.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello
I am working as Software Developer having 2 years of Experience in web based products Development, i done 6 projects on PHP, Mysql and 2 projects on ASP.NET,C# and i am not use any framework for web Development.
any one can suggest me What I do?
i am more interested to learn and do projects on ASP.
Which is best for my carrier ASP.NET/PHP framework learn? php having more Framework and Asp having only one. i am getting some confusion.
please suggest me
thank you
|
|
|
|
|
It depends. Based on own experience,
For .NET - MVC
For PHP - I don't know(never worked). But based on release dates .... CakePHP, Nette, Joomla, Ayoola,.,
Check this to choose any one/more from list
Comparison of web application frameworks[^]
|
|
|
|
|
ok but i ask which is easy
to learn and getting well job
|
|
|
|
|
Well, again it depends.
If you're gonna choose .NET, pick MVC. Do learn regularly. Education Needed[^]
|
|
|
|
|
Hi again Experts,
I have another problem that is stumping me.
The code below loads in a jQuery tab called ExistingRequests.
"aoColumns" : [
{ "mDataProp": "RequestID", "sWidth": "50px", sSortable: true,
"bSearchable": false,
"bSortable": false,
"fnRender": function (oObj)
{
return "<a target='tab' data-tab-name='#RequestDetails' data-tab-index='2' href='viewdetails.php?requestID="
+ oObj.aData["RequestID"] + "'> " + oObj.aData["RequestID"] + " </a>";
}
},
{ mDataProp: "RequestDate", "sWidth": "100px", sSortable: true },
{ mDataProp: "RequestorFullName", "sWidth": "150px", sSortable: true },
{ mDataProp: "PrimarySiteContactDisplay", "sWidth": "250px", sSortable: true },
{ mDataProp: "RequestLocation", "sWidth": "150px", sSortable: true },
{ mDataProp: "RequestDescription", "sWidth": "200px", sSortable: true },
{ mDataProp: "RequestStatus", "sWidth": "100px", sSortable: true },
],
This is of course relevant code.
The code above also has a RequestID that is hyperlinked.
When a user clicks that link, detailed records associated with that link is displayed on another tab called RequestDetails. (Thanks in large part to Richard Deeming).
The problem is that when the data loads into RequestDetails tab, it loads as json data.
We wanted to it load as html form fields with values.
The code below is supposed to help resolve this problem but it doesn't work.
When you click the link, nothing happens.
Can someone please tell what I and doing wrong?
The code below was originally written by Richard Deeming and it would open in RequestDetails tab as stated but after the changes, it longer loads data in RequestDetails tab when clicked.
Your assistance is greatly appreciated.
$("#exmple").on("click", "a[target='tab']", function(){
var me = $(this);
var url = me.attr("href");
var tabName = me.data("tabName");
var tabIndex = parseInt(me.data("tabIndex"), 10);
$.get( url, function( data ) {
var table = $( '<table cellpadding="4" cellspacing="0" border="1"/>' ),
tr = $( '<tr/>' ),
td = $( '<td/>' ),
th = $( '<th/>' );
tr.clone().html( th.text( 'Time' ) )
.append( th.clone().text( 'Room' ) )
.append( th.clone().text( '???' ) )
.append( th.clone().text( '???' ) )
.appendTo( table );
$.each( data.aaData, function(i,v) {
tr.clone().html( td.clone().html( v[0] ) )
.append( td.clone().html( v[1] ) )
.append( td.clone().html( v[2] ) )
.append( td.clone().html( v[3] ) )
.appendTo( table );
});
$( tabName ).html( table );
$("#tabs").tabs("option", "active", tabIndex);
}, 'json' );
return false;
});
|
|
|
|
|