|
Hi
I'm using Asp.net 4 with url routing.
I've got a WebmMethods.asmx file with some methods and another file - WebMethods.aspx with the same set of methods (ctrl+c, ctrl+v) and I call them from jQuery code with $.ajax (POST) function..
and there's this problem that just blows my mind..
on one page (default: http://localhost:3333/site/) calling methods from the aspx files throw 500 exception 'unknown method' while calling them from the asmx file works just fine.
on another page (somePage: http://localhost:3333/site/somePage/) it goes the other way round: calling from asmx file throws the same exception and from aspx works.
I use absolute paths - the files are found by the calls but methods not - when I used some other path I got 'resource not found exception'
so what the hell?
I've spent a few hours googling the problem but found nothing..
If anybody had similar problem or knows why it's like this PLEASE enlighten me
life is study!!!
|
|
|
|
|
problem solved..
some methods were static and some not..
static methods worked in aspx and not in asmx and vice-versa..
damn it..
life is study!!!
|
|
|
|
|
I am studyng Web pages which include some different languages, and one image which let to change from English to German and so on, and the new page appears automaticly in the chosen language, and thinking about how to get it I find two possible ways:
1) keep all the texts in different xml files and generate the page with the xml file associated to the language.
2) Creat a different page for every language and call the one selected.
This are the ways I know and which I can solve the problem, but do you know if is there any other easier way of do it.
Best Regards
|
|
|
|
|
Yes, the first one is the exact thing to do.
You need to use resource for all static text in your website, so that based on the culture or user you can reproduce the page.
Also for database data, you need to store both, or you can use any translation tool like google translator, bing Translation api etc to dynamically translate those data when you display it on the web page.
We generally dont store pages, rather we create reusable resources, which might be used in many web pages.
You can read this article :
http://www.beansoftware.com/asp.net-tutorials/globalisation-multilingual-cultureinfo.aspx[^]
Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution. Visit My Website-->www.abhisheksur.com
|
|
|
|
|
Dear Sir/Madam,
Can you just guide me for creating a report(simple, as well as crystal report) in ASP.Net, please. I can do then both in VB.net.
Prasad Bansi Vagal
PrasadPBV
|
|
|
|
|
Prasad Bansi Vagal wrote: creating a report(simple
What do you mean by simple report?
There are lots of articles on creating SSRS as well as Crystal reports. Look here.
Pick the one that suits your requirement.
|
|
|
|
|
hi to all,
i am new in asp.net. my project is related to tours and travels.
i have created usercontrols for searching car, bus.
now, there is menucontrol which shows menus like,
Home | Bus | Car |Hotel
when i click on Bus it should display the search of the bus for that i have register the usercontrol on Index page of masterpage.
but when i run the project and as i done coding on indexpage of masterpage at the time of displaying menu it shows object expected error and when i click on bus it again shows object expected error and shows the search control.
design is:
<%@ Page Language="VB" MasterPageFile="~/TourMasterPage.master" AutoEventWireup="false" CodeFile="Reception.aspx.vb" Inherits="Reception" %>
<%@ Register TagName="hotelSearch" TagPrefix="UC" Src="~/Search/Hotel/UCHotelSearch.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">
<table width="100%" cellpadding="2" cellspacing="2" runat="server">
<tr>
<td>
<table id="tblHotel" runat="server" width="100%" cellpadding="2" cellspacing="2" style="display:none">
<tr>
<td>
<UC:hotelSearch ID="hotelSearch" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>
i want to show simply a search for user when user click on that bus or car....at that time the submenus should be displayed i.e. add new bus,modify bus etc. (like makemytrip site)
|
|
|
|
|
Hi!
I want to help you, but i'm reading your question over and over, and i can't understand what you are trying to do.
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi..
I m redirecting to a new page.Now how can i get that pages's value?
suppose,
Response.Redirect("aaaaa.com");
now how can i get that new opened browser's(aaaa.com) display page value?(c#.net)
|
|
|
|
|
Your Question is not clear enough.
As you said , you redirected to the page "aaaaa.com", Not what do you want to do on this page.
You can pass value from one page to another page using querystring.
Are you trying to read the page ("aaaa.com") content from your application?
|
|
|
|
|
thanks for response..
yes... after redirecting "aaa.com" i only want to read that page's content ..nothig else to do with taht page...
PUJA FALDU
|
|
|
|
|
puja wrote: yes... after redirecting "aaa.com" i only want to read that page's content ..nothig else to do with taht page...
I think your requirement is read the page content. For this you dont need to redirect on that page.
Say you have a page default.aspx and you want to show the content of aaaa.comn on defualt.aspx. For this you can read the conent on code behind manipulate as per requirement and show it on your page.
So you can read the content like this.
<br />
HttpWebResponse Response = null;<br />
string requestUri = "http://aaaa.com";<br />
Uri oUri = new Uri(requestUri);<br />
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(oUri);<br />
Response = (HttpWebResponse)webRequest.GetResponse();<br />
Stream ResponseStream = Response.GetResponseStream();<br />
StreamReader ResponseStreamReader = new StreamReader(ResponseStream);<br />
string ResponseData = ResponseStreamReader.ReadToEnd();<br />
ResponseData containes the content of the page.
|
|
|
|
|
Thanks a lot....
it works for me....
|
|
|
|
|
your welcome
|
|
|
|
|
Problem- I want to create a web application using any technology to display 5 highest rated videos on YouTube.com relating to the search term "Knit"
|
|
|
|
|
What have you already tried? What problems did you encounter? Until then this is not a homework site.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
okay, so it is gives the top twenty, by why write a web app when youtube search[^] works so well? For that matter, why would anyone bother with your proposed app, when youtube already does it. It would be like writing an app to return the top ten search results from Google for a given phrase, Google already does it.
I suggest you try to be a bit more inventive for your homework.
|
|
|
|
|
developing using Dotnet
If I have a server application, I create virtual irectory for it in IIS.
In the virtual directory, we copy the the bin folder with the
dlls that should run on the server's process.
Suppose I have one more server application, I do the same for the second
application also. I create a virtual directory for the second server
application also and copy the dlls that should run on the server's process.
What if both server applications have couple of common dlls?
Are we not maintaining duplicate copies of them?
In that was is not registering process followed in COM better. Though
there can be a chance of a version overriding the previous one during
installation and registering, we can ensure there are not more than
one version floating around!!!
|
|
|
|
|
For maintaining one dll that is shared among multiple server application
you can use concept of shared dlls in dotnet.
You can register your dll in GAC (Global Assembly Cache)
and then use it in multiple application.
The main advantage of it is that whenever you will update
the shared dll, you need to update it at only one place that
is in GAC.
Find following links for more help on how to
register dll in GAC and then after utilizing it from
multiple server application.
Add/remove a shared assembly to/from the .NET GAC
http://www.thescarms.com/dotNet/gacutil.aspx[^]
Demystifying the .NET Global Assembly Cache
Demystifying the .NET Global Assembly Cache[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Jinal, that means in the GAC I can now maintain muliple versions of the same dll as the metadata in the dlls will differentiate the versions.
It also means that if I do not use the GAC concept and shared dlls, there is a clear cut case of duplicates, isn't?
Regards,
NetQuestions
|
|
|
|
|
Yes,
The Global Assembly Cache (GAC) is a central repository for storing shared assemblies. The GAC allows multiple versions of the same assembly to be installed concurrently and also prevents different assembly vendors from overwriting each other's assemblies.
The GAC is a black boxed repository of assemblies capable of keeping multiple version/cultures of a same assembly. A strongname is considered a unique entry in the GAC (i.e. the GAC requires all it's assemblies to be strongnamed and signed). Note that the GAC has nothing to do with security! In fact assemblies in the GAC aren't verified when loaded from the runtime.
Find following link for registering more than one versions of same dll and
how to call it in our application.
http://www.mono-project.com/Assemblies_and_the_GAC[^]
And Obviously if it is not shared dlls/registered and being used from GAC then there is clear cut case
of duplication.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
NetQuestions wrote: What if both server applications have couple of common dlls?
They'll need both access to the common DLL.
NetQuestions wrote: Are we not maintaining duplicate copies of them?
I hope not. Having two versions in the field isn't the same as maintaining two versions of an assembly.
NetQuestions wrote: In that was is not registering process followed in COM better.
In what way? AFAIK, you'd still need to distribute any library that you're using in your application.
I are Troll
|
|
|
|
|
Hellow..
I would also like to design a website .Where people register then go to a exam page where
10 questions ( randomly comming from the database)
4 options for each question (radio Buttons , Both comming from database)
I need to make it in Vs-2008 ASP.net and the Database should be Microsoft -sql server .
I have created the login pages with the login control from the toolbox but now i am stuck as how to bring the questions and answers from the database ?i also want to set up a timmer in that, so that i can calculate the result and save the result in the database
The login control create a MDF database. can I use this same database For my question and answers? How can i impliment this?
Could you please help me with this?
Thank you
|
|
|
|
|
1. For bringing questions and answers from database.
You can bring questions and answers by using questionid.
Assign unique ID to each question, and obviously there is
associated answers. Your database structure might look as
follows.
Question Table
--------------
Q_ID (Unique Incremental Integer)
Question
Answer Table
------------
Q_ID (Referred from Question Table)
Answer
So, each question is identified by Q_ID.
2. If you use timer then fetch fresh question from database on timer tick, and
update on front-end.
3. You can surely use MDF file that is generated from your login control.
(The condition is it must contain questions and answers)
Use following connection string to connect to mdf file.
Data Source=.\SQLEXPRESS;AttachDbFileName=e:\data\Customers.mdf;Integrated Security=True;User Instance=True
For more information on how to connect to mdf file try following link...
http://msdn.microsoft.com/en-us/library/ms247257.aspx[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
As soon as I see 'Examination System' I think 'homework', especially when it's the persons very first post. Th epoin tof these questions is to help you when you get stuck with a specific problem, we're not here to write a complete system for you!
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|