|
thanks for u reply
i got my error ...........
|
|
|
|
|
Use a relative path, not a static path. That way it can be ported to other environments without headache.
|
|
|
|
|
thanks for u reply ....
i used this path
"file:///E:\aspwork\project 5\image buttons\p_links1.gif"
is u not the relative path
how can we specify a relative path..sir
can u keep one example what is a relative path is
|
|
|
|
|
If the project is in the "project 5" directory, it would be "image button/p_links1.gif"
|
|
|
|
|
yes it is in "image button/asdjf.gif"
can u clearly explain how can we use relative paths .....
|
|
|
|
|
Your relative path IS "image button/p_links1.gif"
Place that in the image's path/url
|
|
|
|
|
hey thanks for ur response.
i got it .....finally..
why is it happening .....
may i know the exact reason....sir....
|
|
|
|
|
Hi,
I am trying to check where user group number 7 is logged in. If they are, then a certain Field mandatory. When I click on save, this procedure is not even running. I have been trying to fix this code since December but I can't find the problem. Please let me know if you can.
Here's the code:
The VB Script
Protected Sub CheckTimeEstimate(ByVal sender As Object, ByVal e As ServerValidateEventArgs)
Dim blDeveloper As Boolean
Dim objAccess As clsAccess
objAccess = New clsAccess
blDeveloper = objAccess.checkHasRight(System.Convert.ToInt32(Session("UserID")), "7")
If blDeveloper = True Then
If Len(Me.txtTimeEstimate.Text) > 0 Then
e.IsValid = True
Else
e.IsValid = False
End If
End If
End Sub
The Validator
<<asp:customvalidator id="cstTimeEstimate" runat="server" forecolor="#7C1E3F" display="Dynamic" controltovalidate="txtTimeEstimate"
="" errormessage="<Img border=0 width='10px' height='10px' src='Images/Star.gif'>" tooltip="This field is Required!" <b="">OnServerValidate="CheckTimeEstimate">
Ignore the double angled brackets at the start of the validator, I did that so the page will display it.
-- modified at 10:41 Tuesday 9th January, 2007
|
|
|
|
|
Dayekh wrote: I have been trying to fix this code since December but I can't find the problem.
What problem are you having that you can't find? That would be helpful.
only two letters away from being an asset
|
|
|
|
|
Sorry .. I modified my post after realising what you pointed out. Here's what I intend for the code to do:
1 - I logon as Developer(User Group).
2 - I attempt to store a record while 'Time Estimate' field is empty.
3 - The Subroutine fires up and checks the ID of the user. If the User is a Developer(in this case 7), the variable blDeveloper is True, and according to my code, the validator will invalidate the developer's request.
The whole point is so that the 'Time Estimate' field is Mandatory for Developer User Group but is not mandatory for others.
Currently, when I try to add a record, the subroutine is not even running. That is the problem.
|
|
|
|
|
I think I found the problem. The validator is not attempting to validate the Textbox because the text box is empty.
How can I get the validator to ignore the fact that it's empty?
|
|
|
|
|
try to place a required field validator first
|
|
|
|
|
Dear CPians,
I want to add a new UserControl to my WebProject. The problem is that I need it be in a way that recompilation is not required. Any ideas?
Thanking you in advance.
|
|
|
|
|
Why would recompilation be a problem?
|
|
|
|
|
Recompilation is a problem for many reasons.
When recompiling, the application restarts, hence sessions are lost.
I want to be able to make a UserControl without having the source code of the entire solution.
Any ideas?
|
|
|
|
|
You are developing on a production server??
|
|
|
|
|
Well, even if I am, it would be great if you had any ideas about my actuall question rather that ranting around other issues.
I shall rephrase in order to help you.
Suppose that that you want to develop a reusable component, like a Custom Control but for reasons X, Y or Z you actually want it to be a UserControl and not a WebControl. Is there a way to deploy a UserControl in a way you would deploy a WebControl?
Please, dont ask me why wouldn't I develop a WebControl at the first place. Lets suppose that you have the reason.
Thank you.
|
|
|
|
|
theJazzyBrain wrote: rather that ranting around other issues.
I'm not ranting. I'm stating that there are no valid reasons to avoid recompilation. The real problem is not the UserControl, but the environment.
|
|
|
|
|
That is true,
but suppose that changing the envirnment is out of the question. How would you come around such a problem?
|
|
|
|
|
Dear All
I created a project with full exception handling (Try, Catch) in all subs and functions, I know that this will affect the performance negatively but i'm in the testing phase and exception handling will be removed for the release
My question is: is there a way to keep the exception handling statements and restrict them to the debug mode and step over them in realease mode without having to keep two seperate copies for debug and release?
I was told that this was available in Visual Studio 6 so there must be something like it in VS 2003
Thanx in advance for help
Best Regards
3ala2
|
|
|
|
|
#if DEBUG
but it's not recommended.
|
|
|
|
|
ednrgc wrote: but it's not recommended.
And why is that?
only two letters away from being an asset
|
|
|
|
|
Because the try/catch/finally blocks should be used throughout, not just in debug mode. The performance hit is not as great as some people expect. Even if it's inside a multi-iteration loop, you may be able to move the try block outside the loop.
|
|
|
|
|
Your post seemed to imply #if DEBUG was not recommended
only two letters away from being an asset
|
|
|
|
|
Oops Sorry for my lack of articulation. Point well taken.
|
|
|
|