|
I have one field of Gridview populated from a DB (MS SQL Server) this way:
One field is (for example) http://google.com
<asp:TemplateField HeaderText="Link"
SortExpression="Link">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "URL") %>' DataNavigateUrlFields="URL" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "URL") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="URL" runat="server"
Text='<%#Bind("URL") %>'>
</asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="URL" runat="server" width="65px">
</asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
The problem is, when I click the http://google.com field, I go to http://google.com%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20\%20%20%20%20%20%20%20%20%20%20(...)
20 is the ID of the field..
What am I doing wrong ?
|
|
|
|
|
Your html seems ok. %20 means url encoded space. Did you check the values in database? Is there any empty space in url?
|
|
|
|
|
Well, the field in the table of DB is char(100).. (MS SQL Server 2005)
Maybe if I use VARCHAR I solve the problem? Not with my pc right now to test.
|
|
|
|
|
Trim the results... removes leading and trailing spaces .
|
|
|
|
|
I honestly didnt understood what you just said about trimming the results but tomorrow I will try changing type of variable on DB and see if it solve the problem..
|
|
|
|
|
When you select the value from the database, use the TRIM() function to remove leading and trailing spaces.
In SQL Server, this is ltrim(rtrim(FIELDNAME))
|
|
|
|
|
That's exactly what I said...
Using VARCHAR everything works fine!
So many time wasted...
Thanks for your help!
|
|
|
|
|
hi
Try using this way this is working for me..
asp:HyperLinkField HeaderText ="Select Patient" DataNavigateUrlFields="patientId,maxAdmissionNo" DataTextField ="patientId" DataNavigateUrlFormatString ="ScheduleAppointment.aspx?&adMissionNo={1}&Patient_Id={0}" ItemStyle-HorizontalAlign ="Center" HeaderStyle-BackColor="#888888" HeaderStyle-ForeColor="white"/>
|
|
|
|
|
Hello, I am creating a asp.net (2.0) form which has about 40 fields. For each one of these fields, I'm required to have a small imagebutton which when clicked opens a pop-up window with a heading and help text that are picked up from the config file. I solicit your suggestion to implement this in an efficient and easy way.
Thanks for your help
|
|
|
|
|
Create an aspx page for your help page. When you call it, pass it some kind of querystring parameter to identify the help item you want. In the page load function, check the parameter and display the correct text on the form as per the value of the parameter.
|
|
|
|
|
link the image using the href tag
|
|
|
|
|
You can simply do it with javascript. Jquery have some plugins for tool tip help. To use the help text in javascript, you need some server side code to inject help text from config file to page.
|
|
|
|
|
Hi Guys,
I have a applet that runs with no issue in asp.net web application ...
Now we are migrating it to ASP.MVC application ..here applet is not working throwing class not foind exception
please let me know if anyone could able to run applet in MVC application .. below is the code from view
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.6.0/jinstall-6u11-windows-i586.cab#Version=6,0,0,11"
id="DeviceControl">
<param name="java_arguments" value="-Xmx256m" />
<param name="CODE" value="/com/XYZ/application/main/SomeApplet.class" />
<param name="archive" value="all jar path" />
<param name="type" value="application/x-java-applet;version=1.6" />
<param name="scriptable" value="true" />
<param name="mayscript" value="true" />
</object>
exception that i am gettting is
load: class com.SomeApp.scanner.main.ScannerApplet.class not found.
java.lang.ClassNotFoundException: com.XYZ.application.main.SomeApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:3213/Appname/com/XYZ/application/main/SomeApplet/class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
modified on Tuesday, November 10, 2009 6:09 PM
|
|
|
|
|
Your applet has nothing to do with ASP.NET, you're embedding it with the same HTML you'd use if this was PHP. I'd say the class is missing, and that MVC has noting to do with it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sorry Graus,
But i think MVC has .....
i think i need to ignore the class path of Applet as its not gettig path of class files.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
My Mistake Chris.
Actually you are right its no way related to MVC ...
thanks for providing right solution
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
I work a company, they want to create an ecommerce, offering to buy their product through to Internet. we are preparing to join the ecommerce site with our internal system.
we have developed our structure and we have different DMZ
DMZ1 - application server(server 2008 and apache)
DMZ2 - layer business web services (server 2008 and iis, aspnet 2.0)
DMZ3 - partial data base (server 2008 and Sybase) This data base will be connected to our data base internal.
i omit details of configuration of communication equipment
Mode to connect
DMZ1 connect to DMZ 2 , DMZ 2 connect to DMZ 3 , DMZ3 connect with internal system
In this moment the web services only accept call from DMZ1(application php) but in the future the company can offer services to other company o user.
I am investigating how to secure web services according to my stage
How use php client to use a Microsoft WSE 2.0 services? If found “WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source, enterprise grade, PHP extension for providing and consuming Web Services in PHP. WSO2 WSF/PHP is a complete solution for building and deploying Web services, and is the only PHP extension with the widest range of WS-* specification implementations.”
should use Microsoft WSE 2.0 services according ? in the case no what can I use for this?
if this is correct what specifications ws-* I should use?
Thanks for the time
regards,
Miguel
|
|
|
|
|
hello
some one can give comment about this
thanks
|
|
|
|
|
Hi all,
My application is an asp.net web application which deals with different user logins(user types like Gatekeeper and Pde users).
Here only i am facing one peculiar problem that In Gatekeeper (login) uploaded one txt document in the application.After uploading QA team taking the copy of URL of uploaded document.
Let say URL be like :http://localhost/cms/UI/Documents/BoltonCMS11102009112303PM.txt
Now QA team they are login as Pde user and trying to paste the above URL in Home page,at this moment the uploaded document that is the txt file is opening which is a bug we need to restrict to open that uploaded document .
Could any one help on this?
thanks in advance,
Eswar.
|
|
|
|
|
Instead of a direct link to a file, have a link to a page which takes an id on the query string, uses the id to lookup the file, and fails to do so if the permissions check fails. Or write a HTTP Handler for the file type which first checks permissions. I'd go the former, if you can hide the actual file path, it's harder to hack.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dear All,
Related to one of my below questions, does somebody know how to create a transparent pop-up..
(I sometimes see in web-pages, page gets dark (a transparent one, and a notification appears in the middle of the page(ofcourse the note is not dark))
Thanks in advance.
|
|
|
|
|
That is achieved using css. See this[^] page.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Dear Christian,
Thanks for the answer
|
|
|
|
|
Ersan Ercek wrote: Christian
I am not Christian. He[^] is.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
okay... for me you are christian, why are you using what he says than? He is founder of the site right?
|
|
|
|