|
|
Sir, i added style="padding:0px; margin:0px;" to the iframe tag but it doesn't work.
Help people,so poeple can help you.
|
|
|
|
|
|
How to add Group wise latest discussion Linking plugin to web site
|
|
|
|
|
Hello,
in my app I heave three roles: "admin", "user" and "company". The user can heave only one role. I want that after checking the database redirect them to certain pages - more precisely their content panel. How to specify the page to redirect for each user when it is not contained in:
FormsAuthentication.RedirectFromLoginPage(userName,createPersistantCookie);
or
FormsAuthenticationUtil.RedirectFromLoginPage(userName, commaSeperatedRoles, createPersistantCookie);
I know it is specified in web.config as default and it works for your site, but, the problem is that when I type in the URL to directly access the "admin"'s content panel (admin\default.aspx) and then try to login as "user" it does not directs me to the "user"'s content panel (user\default.aspx) but it remembers the "admin"'s one (admin\default.aspx) and redirects me to login.aspx which is NOT correct. The user exists and it should redirecting me to the default user's page.
What you suggest about this?
|
|
|
|
|
It probably wrote the value to a cookie, and saved the group setting. So Admin is always admin once the cookie is wrote.
FormsAuthentication.RedirectFromLoginPage(userName,createPersistantCookie);
Perhaps if you set coookie to FALSE, or change your code to update the group when changed, you'll get the desired behavior.
|
|
|
|
|
I have a site with a page whose url is like: http://localhost:2324/Page2
When the back button of browser is pressed the url changes to http://localhost:2324/Page1
However, the browser still shows contents of page2. Obviously if I press refresh then the browser refreshes the page.
Any ideas?
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
You have to fix the error in your URL map. Since Page2 did not have an extension, then it must be a mapped value to lets say page2.aspx. You as a programmer control the mappings (page2) that are sent to IIS Server for reverse mapping back to a page2.aspx?value=1, using your map as reference.
It is in my opinion that your trying to do too much at once. The implementation of query strings plus learning how to program or structure url mappings for IIS Server seems to be confusing you.
You may want to consider creating a paper map, like a visio diagram that holds the data structure of your program, so you can confirm that every possible scenario works first on paper in query strings, and then create your url map according to your Visio.
|
|
|
|
|
I have a site with these views: Categories > Products for Category X > Product Details for Product X > Confirmation Page
The first view has a bunch of categories and each has a link such as below:
http://localhost:39532/Product/List?CategoryId=94fc667e-6fec-4f76-a83b-7840df34e373&pubGuid=a6883116-560f-43e9-9ceb-7fc0a410b210&page=1&totalCount=30
When users click this it will show the 2nd view's page 1 with 10 products (paging). I am passing totalCount since I already know it in the first view and I don't want the server to have to get it again and I cannot store it in sessions or cookies. Requirements are:
Users should be able to email this url and someone else should be able to copy paste and it should work.
The Products for Category X page will have 10 products and each product will have a link for more details. The link will be like below:
http://localhost:39532/Product/Info?productId=0f0c1207-e002-4430-ae10-2ee533516b2f&CategoryId=94fc667e-6fec-4f76-a83b-7840df34e373&addedToShoppingCart=False
Users can click this link to view further details, add/remove to shopping cart based on the value. The questions I have are:
When the user adds the product to shopping list it will go to a confirmation page where they can view shopping cart or continue browsing. If they click continue browsing it should go to the product list page they were on which in this case is:
http://localhost:39532/Product/List?CategoryId=94fc667e-6fec-4f76-a83b-7840df34e373&pubGuid=a6883116-560f-43e9-9ceb-7fc0a410b210&page=1&totalCount=30
But how will the confirmation page know this info? Do I need to pass it into the ProductController.ProductDetail action which will then pass it to Confirmation.Confirm action? Now my actions will have parameters which are only to be passed onto some other view.
Let me know if my question does not make sense.
CodingYoshi
Artificial Intelligence is no match for Human Stupidity.
|
|
|
|
|
You have to capture the last url and store the value in the confirmation page.
|
|
|
|
|
Hi,
My web application exports a List of objects to an Excel spreadsheet by creating a DataGrid and binding it to the List . The objects that the List contains include columns whose type is DateTime and while the resulting spreadsheet correctly lists all the objects, the date format is US instead of UK (which is what I want) - to be expected really.
I can, of course, create a new object class and copy each object in the List to a second List of these new object types and bind the DataGrid to that but I'll have to do the same for every list of object types I want to export.
Can anyone suggest a simple method to resolve this issue?
Thanks
Evil cannot be conquered in the world... It can only be resisted within oneself.
modified 11-Jan-12 6:20am.
|
|
|
|
|
Simplest method turned out to be iterating through the list, parsing any DateTime fields with the DateTime.Parse() method specifying "en-GB" CultureInfo as the DateTimeFormat parameter
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
Hi all,
May we compare the two template fields of Gridview with Compare Validator like below
<asp:TemplateField HeaderText="Qty">
<ItemTemplate>
<asp:TextBox ID="txtSendingQty" runat="server" Enabled="False"
Text='<%#Bind("Qty")%>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Recive Item">
<ItemTemplate>
<asp:TextBox ID="txtReciveItem" runat="server"
>/asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
I want to validate the Receive Item with Qty using Compare Validator that User can not insert value greater than qty in Receive Item.
Any Idea
Regards,
|
|
|
|
|
Hi,
Try the below code,
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtReciveItem"
ErrorMessage="CompareValidator" ControlToCompare="txtSendingQty" Operator="GreaterThan" SetFocusOnError="True" Type="Date"></asp:CompareValidator>
Hope this helps.
-Manognya
__________________________________________________
$ God gives what is best.Not what all you wish
|
|
|
|
|
you can use custom validator with client validation function as below..
function compare(source,args)
{
var receive = parseInt(document.getElementById('txtReciveItem').value);
var sending = parseInt(document.getElementById('txtSendingQty').value);
if (receive > sending)
{
args.Isvalid=false;
}
else
{
args.Isvalid=true;
}
}
see more here[^] on custom validators
with regards
Karthik Harve
|
|
|
|
|
I guess you can, or may
I don't see the point of it.
Just put the qty value in the receive textbox, so the user doesn't have to type in the number unless needed. What if more are received than ordered?
Check the value when the form is submitted on the client or server side.
|
|
|
|
|
sir iam using asp.net3.5 with c#
i want the same menu as code project web site as top navigation as well as left navigation in code project website, can you give me example
|
|
|
|
|
developerit wrote: i want the same menu as code project web site as top navigation as well as left navigation in code project website, can you give me example
Hi I do not know why You would want Your menu's to point to Code Project?
Just Kidding, I would say it was done With a combination of un-ordered-list, Css And Maybe JavaScript. Why don't You just view source in the browser?
Frazzle the name say's it all
|
|
|
|
|
|
hi
i have following line of code
randomNumber = Math.round(100000*Math.random());
url = "sample.aspx?host="+host+"&port="+port+"&targetName="+targetName+"&imageMode="+imageMode+"&randomNumber="+randomNumber;
alert("callbegins:Authentication.aspx");
location.replace(url);
alert("callends:Authentication.aspx");
break;
in the Authentication.aspx page i have the client code which connects a device. when the line of the above code getting executed it is redirecting to the URL server side but my javascript code are not working. when i call alert after replace then the page getting redirected and client code is getting excuted.
i am confused that why when putting alert after replace it is redirecting and calling client code but when the alert commented then the client code not working.
this issue is in fire fox, and in IE9 its not at all redirecting if alert also there.
please clarify me why this happens
thanks
|
|
|
|
|
I didn't take the time to look it up,
but wouldn't it be
window.location(url);
to use javascript to redirect to another page?
If it's the same page, I don't see the purpose of it.
The alert is just a message box, used for diagnosing values, or to tell the client something important.
FYI;
You need to encode the url with utf-8 or something before calling window.location(url)
|
|
|
|
|
thanks for your time & reply...
Encoding also didn't helped me. the page getting opened when i am using
window.open("URL");
but not when using
window.location.replace("URL");
|
|
|
|
|
take the double quotes off url.
I think you misinterpreted encoding. You just want to make sure that the url you create is in the correct format. encodeURI and encodeURIComponent.
But skip that for now.
window.location(url) will redirect the current page to a new page indicated by url
window.open(url) will open a new browser window, or a new tab, with the value url
it always works unless your url value has an error in it. I would have to see the string you created to see if it is a valid format.
|
|
|
|
|
url = "Authentication.aspx?host=" + host + "&port=" + port + "&targetName=" + targetName + "&imageMode=" + imageMode + "&randomNumber=" + randomNumber;
As you suggested i used as below,but that too didnt helped me out.
url=encodeURIComponent(url);
window.location.replace(url);
(Authentication.aspx%3Fhost%3D172.2.542.166%26port%3D5900%26targetName%3D172.2.542.166%26imageMode%3DColor%26randomNumber%3D79148)
this is the url i need to redirect to, i am getting break point in c# but my client side not getting executed.even i placed an alert in body onload,alert is not shown.this is happening in IE9,FF,chrome all this are HTML5 new browsers.
thanks for the reply..
modified 11-Jan-12 0:14am.
|
|
|
|
|
I need to see the url string after construction, just use alert(url);, and copy the result in this window.
Most likely, you string may be corrupt, and the function failed.
|
|
|
|