नमस्ते, मैं एएसपीनेट प्रौद्योगिकी में नया हूं
मुझे छोटी सी जानकारी चाहिए, मैं C#.net वेबएप्लिकेशन में अपने होस्ट के रूप में “फाइलसिस्टम” का उपयोग कर रहा हूं,
यहां मेरी समस्या यह है कि मैं हाइपरलिंक के माध्यम से यूआरएल को “www.google.com” पर ले जा रहा हूं लेकिन मैं इसे कुछ और मान रहा था
“http://localhost:1162/Secure%20Distributed%20Systems/www.google.com“
मेरा नमूना कोड है
HyperLink1.NavigateUrl ="www.google.com";
और मैं भी ऐसा ही प्रयास कर रहा हूं
हाइपरलिंक==>
गुण==>
नेविगेटिंगurl=’WWW.google.com’
मैं दोनों प्रकार का प्रयास कर रहा हूं, समस्या क्या है, इससे कैसे बचा जाए
समाधान 1
ये कोशिश करें
<asp:HyperLink ID="MyHyperLinkControl" NavigateUrl="http://google.com" runat="server">link</asp:HyperLink>
समाधान 89
आपके ASP.NET हाइपरलिंक कोड का अनुवाद इसमें किया जाएगा:
<a href="www.google.com">link</a>
यदि कोई लिंक प्रतीक स्लैश “https://www.codeproject.com/” या “https/http” योजना के साथ उपसर्ग नहीं है, तो ब्राउज़र आपके दिए गए लिंक को वर्तमान वेब फ़ोल्डर पथ के साथ जोड़ देगा।
उदाहरण, यह:
www.google.com
यह बन जाएगा:
Fastest Web Hosting Services | Buy High Quality HostingMonsterhost provides fast, reliable, affordable and high-quality website hosting services. We're a Hosting Monster with unmatched security, 24/7 expert support.
या यह:
Fastest Web Hosting Services | Buy High Quality HostingMonsterhost provides fast, reliable, affordable and high-quality website hosting services. We're a Hosting Monster with unmatched security, 24/7 expert support.
इसका ASP.NET में हाइपरलिंक सर्वर नियंत्रण से कोई लेना-देना नहीं है। यह HTML का डिफ़ॉल्ट व्यवहार है.
इसलिए, आपको इसे योजना के साथ उपसर्ग करना होगा:
https
इस कदर:
<asp:HyperLink ID="hp1" runat="server" NavigateUrl="https://www.google.com">Link</asp:HyperLink>
समाधान 2
उपयोग
यह
यह निश्चित रूप से काम करेगा
hyperlink1.NavigateUrl="http://www.google.com"
コメント