|
With above details no one will be able to get your problem details what you are facing.
Will suggest you to put your separate problems with code in question's section, it will help you to get solution faster.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
I have a webpage in VB.net with a link so that when users click a url link, it directs them to an external website and it works but I want to add a extra layer so that it shows a message or intermediary page before the external page is loaded to the user. For instance, show a progress bar with delay and message stating "You are leaving this website" before showing or being redirected to the external page. I am using the code below to show the external link. Can you please help with this:
<a href = "<%# Eval("LinkUrl") %>" target="_blank"> Go to link</a>
Thanks in advance
|
|
|
|
|
I did do something similar quite some time ago which, while probably regarded as crude today, did at least work.
Essentially I had an intermediary page that took the target URL as either a query string (which could be the case here) so:
<a href = "<%=[urltoyourintermediarypage] + "?targetpage=" %><%# Eval("LinkUrl") %>"
target="_blank"> Go to link</a>
or as a variable (using an asp:hyperlink control).
The page then had a delayed meta-refresh to the target but while it was displayed showed a message warning that they were leaving the site and if they didn't want to continue to hit the cancel which'd just do a javascript history back.
|
|
|
|
|
Hi all,
I have a controller called EmployeeController, which has an action method GetEmployee to get a particular Employee details. For that it seems we need to pass Employee Id = 1 for example as
http://TestApp.com/Employee/GetEmployee/1, if I am not wrong. I am new to MVC.
But the requirement for me is to not to pass that Employee Id over the browser to get Employee details, can we have any mechanism to do the same to not to pass Ids over the query string or browser still can execute the GetEmployee action method.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Yes, make the ID parameter as an optional parameter. By default, the ID parameter is always optional in ASP.NET routing provided in the template.
Secondly, if you would not pass it as a query parameter (URL parameter), you would need to pass it as a form encoded object, much like a POST HTTP request. Then, you would still be able to get the value of ID. But if you do not pass it, how would you know which ID to use to show the details?
Browser doesn't execute the method, it is your server that does! So the function is executed on your server-side, the URL is just required to map the request to a response.
class Employee : Controller
{
public ActionResult GetEmployee(int? id) {
}
}
But much recommended way is to design your routing in such a way, to have ID optional.
routes.MapRoute(
name: "EmployeeRoute",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Employee", action = "GetEmployee", id = UrlParameter.Optional });
This is much better way of doing this!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
If you pass the data via a POST (form submission) then it won't show on the url, however if security is your concern here then using POST is *not* secure, instead you should implement some form of proper authentication.
http://forums.asp.net/post/5825782.aspx[^]
|
|
|
|
|
Sir,i want to know how to free host asp.net websites
|
|
|
|
|
|
|
Hi does anyone have a properly implemented MVC Flux example implemented on .net that I can use to research this pattern.
L Viljoen
Technical Lead / Architect .NET, Unity, C++
|
|
|
|
|
Google has a few, but you have to go and look for them.
|
|
|
|
|
Not to stress I gave Google a go before actually posting the Question , but most info is very vague. I did some reseach on how this is implemented using other languages and once I have my bearings I will create an article on codeproject
L Viljoen
Technical Lead / Architect .NET, Unity, C++
|
|
|
|
|
How can i redirect a domain name to .aspx page in asp.net..i.e when i type www.test.come..it should redirect me to my xyz.aspx page...i did try with iis 7 but when i type domain name in browser it shows web page not available.How to overcome this issue.
Thanks
|
|
|
|
|
You need to set xyz.aspx as the default page for this domain in IIS.
|
|
|
|
|
can u plz explain me step by step process of doing it?
Thanks
|
|
|
|
|
Thank you sir...i got it worked through your solution..but its only working in LAN not in WAN...though i did port forwarding as well n provided my hosting machine ip address, lan port i.e 8023 and wan port i.e 8080 ...then trying to access my application on different machine in same lan by giving ....url as public ip address/www.xyz.com...but its saying web page cant be displayed on different machines..
Please guide me to overcome this issue as well
Thanks
|
|
|
|
|
Hi
I want to be able to populate a drop down list based on the selection of another one or others using vb.net and also pass the value selected to another page or within the same page. for instance one drop down to select a country and a second one to populate the cities based on the first selection. I added one in the code below one below so need to add another one and populate it based on the selection in the first one. I am not using a Database. I just want the selection from the list as it is added manually.. Can you please advise of an example on how to achieve this or help exapand the code below . Thanks
<Script Runat="Server">
Sub Button_Click( s As Object, e As EventArgs )
if IsValid then
response.redirect ("test.aspx?id=" & countries.Text & " ")
end if
end sub
</script>
Select a Country <asp:dropdownlist id="countries" runat="server"
="" appenddatabounditems="true">
<asp:listitem>France
<asp:listitem>Spain
<asp:listitem>USA
<asp:listitem>Italy
<asp:listitem>England
<asp:button id="Button1" runat="server" text="Search..." onclick="Button_Click">
</form>
|
|
|
|
|
Hello,
You can't do this smartly without any RDBMS / database table mapping on country with the cities to populate the list.
Regards,
Md. Marufuzzaman
|
|
|
|
|
when writing sql query in aspx file having alias with space I:e select emp_no as " emp no" working fine in database but giving syntax error when i run the same query in .aspx page of asp.net which is code behind file..how to resolve this issue?
Thanks
|
|
|
|
|
Put brackets around the alias;
"select emp_no as [emp no] from ..."
|
|
|
|
|
Dear all,
We are working on an eCommerce application nearly ready to go online.
The issue we face is that when we upload an image to the product, it does not fit in the prorate form, It gets stretched either vertically or horizontally thereby getting it out of shape.
The image thumbnail layout type that we have in the front end is in Landscape, and if the image being uploaded is in a landscape format, it fits perfectly, also with size reduction. But if the image being uploaded is in Portrait format, it gets stretched to the full width making it look 'out of shape'.
Will appreciate if some one can suggest a code or an external API which can display the image in proportionate without stretching.
|
|
|
|
|
You just need to modify your code so that images are displayed at the actual size of the image, rather than the size of the display window or panel.
|
|
|
|
|
You can either display the image as it is, or if you really want to make it a set size you'll need to change the image when you upload it so it fits the space. Google for "c# change aspect ratio of image" and you should find some sample code, it's just a bit of maths and using GDI.
|
|
|
|
|
Hi! May someone tell me how i can scan a qrcode and show the data in a textbox in the same time save the data in database?
Thx in advance.
|
|
|
|
|
Where is the scanner, and what is it connected to?
|
|
|
|