|
|
i have 3 projects in my .sln file.
1 - webproject (vb.net), 2 vb.net class library(Schemas) 3. c# class library (Managers).
i am passing Schemas object from code behind of web project to a method of Managers class.
it is giving an error as
"Reference required to assembly 'Schemas' containing the type 'Schemas.mySchemas'. Add one to your project."
All the references correct.
current references :
webproject having ref. to Schemas and Managers prjs
Managers having ref. to Schemas prj.
Please suggest me how to go about this issue.
Thank you inadvance.
-- modified at 1:24 Thursday 26th October, 2006
PradeepG
|
|
|
|
|
When you are passing an assembly's object to another assembly/Project. The receiver assembly/project should have the reference of sender's assembly.
In your case:
Webproject is having reference to both "Schemas" and "Managers"
but
"Managers" is not having reference to "Schemas", add the reference.
akhilesh
|
|
|
|
|
Hi Akhilesh Yadav,
Managers class also having a reference to 'Schemas'
This problem is giving when i am passing a vb.net class object to a c# class method.
It was working for vb.net class object to a vb.net class method.
Problem is peculiar
PradeepG
|
|
|
|
|
Correct me if I'm wrong
you are having three projects in sln.
1. Web Project -- VB.Net
2. Schemas (Class Library) -- VB.Net
3. Managers (Class Library) -- C#.Net
if all things are correct then check declaration of C# class method which will receive VB.Net class object. This error is in relation to referecne only.
Regards,
Akhilesh Yadav
|
|
|
|
|
code behind of web app.
Imports Schemas
Imports Managers
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objSch As New mySchemas
Dim objMan As New myManager
objSch.FirstName = "Scott"
objSch.LastName = "Perk"
objMan.AccessSchema(objSch) 'Error in this line :objSch
'Error during compliation
End Sub
-------myManager.cs----------------
using System;
using Schemas;
namespace Managers
{
///
/// Summary description for Class1.
///
public class myManager
{
public void AccessSchema(mySchemas objReg)
{string FN,LN;
FN = objReg.FirstName;
LN = objReg.LastName;
}
}
}
--- MySchemas-----
Public Class mySchemas
Private strFirstName As String
Private strLastName As String
Sub mySchemas()
strFirstName = ""
strLastName = ""
End Sub
Public Property FirstName() As String
Get
Return strFirstName
End Get
Set(ByVal Value As String)
strFirstName = Value
End Set
End Property
Public Property LastName() As String
Get
Return strLastName
End Get
Set(ByVal Value As String)
strLastName = Value
End Set
End Property
End Class
PradeepG
|
|
|
|
|
Sorry for late reply.
I checked your code. It's absolutely fine.
I tried giving the project references.... got the problem.
Then I tried giving reference from DLL i.e copy paste the dll in web project's bin folder and then give reference from bin.
Solution was sucessfully built.
Regards,
Akhilesh Yadav
|
|
|
|
|
Thanks Akhilesh. I also did the same thing.
PradeepG
|
|
|
|
|
Recently I'm working on a network application which is implemented with WinInet and provides HTTP access to internet.
And it works well for direct connect and HTTP proxy situation, except the case where customer's environment needs the information of domain name during proxy authentication, which means there's a domain-controller server in customer's office.
Since the WinInet API like InternetSetOption supports only the "Username" and "Password",how and where to specify the "domain" name?
I've referred to MSDN, but could NOT find information about that.
Thanks for any comments.
Chairman
|
|
|
|
|
Hi Friends,
I have developed a file uploading utility which uploads file.
my problem is.
When i get the conents of the folder and list my files on the page.
I want to give the option of downloading that file.
When there is no space in the name of file it works, it allows to download but
when there are spaces between the file name it just shows the first word of file name
for example
file name is
my resume.doc
my utility will only allow to fownload file when i change its name to
myresume.doc
otherwise it will show under link only
my
can any one help me how to reslove this problem.
i am using classical asp.
Naveed Kamboh
|
|
|
|
|
Normally I would ask you to show some code, but I am pretty sure about the two bugs that you have in your code that causes this.
Bug #1:
You have forgotten to put quotes around the href attribute.
Bug #2:
You have forgotten to url-encode the file name.
Your code, that probably looks something like this:
<a href=<%=objFile.Name%>>Download</a>
should be looking like this:
<a href="<%=Server.UrlEncode(objFile.Name)%>">Download</a>
---
b { font-weight: normal; }
|
|
|
|
|
Thanks dear,
there were no bugs which you mentioned.
That routine to fill the table was in a seprate page,
I was including that page into that page where I wanted to show that table.
When put that code directly to the page every thing was working.
Problem is solved but I dont know why it was not working while i was includeing file and calling that function.
Naveed Kamboh
|
|
|
|
|
Sorting is indeed simple but i am not getting how we can make
use of sorting in paging environment so that all pages should
get sorted when we click on the column heading.
|
|
|
|
|
You have to do the sorting before the paging. You have to know the order of all the items, before you can get the items that should be shown on a specific page.
---
b { font-weight: normal; }
|
|
|
|
|
If you're binding a dataview, you can sort the entire dataview.
|
|
|
|
|
Can anyone give me a name/URL to a good web based rich text editor?
It must be able to work with images. Also I need it as customizable as possible.
Money for this is not in short supply, but is limited.
I might have to have it developed, but it would be more productive if there was an already made one.
Brad
Australian
Have you tried Rebooting it?
|
|
|
|
|
Check Google with "Rich Text Editor web" and you should get a large list, including some open source projects.
|
|
|
|
|
|
I'll second TinyMCE. I would say they are fine, but then again I didn't work with any other so I can't compare.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
The code below is for a simple form with a listbox and two buttons that can be used to re-order the items using Javascript - the new order is then written to a hidden text input field (which is sent back to the server on postback and can be processed there.)
It works fine in Internet Explorer but not in Firefox. If anyone knows why, or has better code (I freely admit to not being an expert in javascript) I would be grateful
thanks
Fred
<HTML>
<HEAD>
<TITLE></TITLE>
<script language="javascript">
<!--
function moveup() {
var s = document.getElementById("s1");
// get select items details
var i = s.selectedIndex;
if (i<1) {return true;} // nothing to do
var n = s.options(i).value;
var t = s.options(i).text;
// get details of next item one up the list;
var i1 = i-1;
var n1 = s.options(i1).value;
var t1 = s.options(i1).text;
var l = s.length;
var a = new Array();
var b = new Array();
// var to hold new order
var o = '';
var x;
for (x=0;x<l;x++) {
a[x] = s.options(x).value;
b[x] = s.options(x).text;
}
s.options.length=0;
for (x=0;x<l;x++) {
if (x==i1) {
s.options[x] = new Option(t,n,true,true);
s.options[x+1] = new Option(t1,n1);
x++;
} else {
s.options[x] = new Option(b[x],a[x]);
}
}
for (x=0;x<l;x++) {
o += s.options(x).value+',';
}
var tx = document.getElementById("t1");
tx.value = o;
return true;
}
function movedown() {
var s = document.getElementById("s1");
var l = s.length;
// get select items details
var i = s.selectedIndex;
if (i==l-1 || i==-1) {return true;} // nothing to do
var n = s.options(i).value;
var t = s.options(i).text;
// get details of next item one down the list;
var i1 = i+1;
var n1 = s.options(i1).value;
var t1 = s.options(i1).text;
var a = new Array();
var b = new Array();
// var to hold new order
var o = '';
var x;
for (x=0;x<l;x++) {
a[x] = s.options(x).value;
b[x] = s.options(x).text;
}
s.options.length=0;
for (x=0;x<l;x++) {
if (x==i) {
s.options[x] = new Option(t1,n1);
s.options[x+1] = new Option(t,n,true,true);
x++;
} else {
s.options[x] = new Option(b[x],a[x]);
}
}
for (x=0;x<l;x++) {
o += s.options(x).value+',';
}
var tx = document.getElementById("t1");
tx.value = o;
return true;
}
// -->
</script>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<form>
<select name="s1" size="4">
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
<option value="Yellow">Yellow</option>
</select>
<input type="button" value="Up" onclick="moveup();">
<input type="button" value="Down" onclick="movedown();">
<br><br><br>
<input type="hidden" name="t1">
</form>
</BODY>
</HTML>
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
Standard question #2:
What error message do you get?
Open the Javascript Console in Firefox, so that you see the Javascript error messages.
---
b { font-weight: normal; }
|
|
|
|
|
There you go - I didn't even know there was such a thing as a js console in FF!
By "not working" I mean nothing happens when the buttons are clicked - in IE teh selected item moves up or down in the select box.
It says "s has no prperties" on lines 11 and 49 , which are at the start of the two functions...?
F
|
|
|
|
|
I suppose it helps if I actually give the select element an id and not just a name property! Doing this helps, but now FF says "s.options is not a function" - yes, we know, it is supposed to be referring to the options of s...
It's my bedtime. Any ideas from anyone will be greatly appreciated over breakfast!
cheers
F
|
|
|
|
|
For some strange reason IE allows parentheses when accessing a collection. Use square brackets:
var n = s.options[i].value;
---
b { font-weight: normal; }
|
|
|
|
|
yay Guffa! - I always knew you were a genius
thanks
F
|
|
|
|