|
am trying to use .cs class file in my vb.net project.
I read that in vs2005 ,it compiles the multiple languages.
and now in my app_code folder i have added some of my .vb classes and for c# classes i have added folder and inside i placed my c# files.
i have added the following tag in my web.config
<codesubdirectories>
<add directoryname="CsCode">
When am just compiling it is giving error ,identifier expected in the below line
<%@ Page Language="VB" AutoEventWireup="false" codeFile="Default3.aspx.vb" Inherits="Default3" %>
and i wanted to create instance of that .cs class and want to use in my .vb.aspx file.
Can it be possible,ya am i interpreting wrongly?
please send me what i have to do in this case?
please if u have time......
kissy
|
|
|
|
|
Does it compile properly after putting the C# and VB Class in different folder? Did you set the web.config Subdirectory Section like
<Compilation>
<codeSubDirectory>
....
<add directoryName="CSharpFolderName"/>
.....
</codeSubDirectories>
</compilation>
Then try to access the call method using object that class. Also check the class access modifier.
|
|
|
|
|
while building itseldf it is showing the error like "identifier expected"
in the following line..
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>
ya i have added the same in my web.config file.
there is no intellisence coming with my .cs class file.
kissy
|
|
|
|
|
hi
I have a freetextbox, a hiddenfield and a button on my web page. By pressing the button it insert the text from hiddenfield into freetextbox at current cursor position. I am doing this task using java script. when I run the webpage it give me Object required error. The code is given below
//Javascript Code
// HTML Code
<FTB:FreeTextBox id="FreeTextBox1" toolbarlayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,
FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,
runat="Server" DesignModeCss="designmode.css"/>;
<asp:HiddenField ID="HiddenField1" runat="server" />;
<asp:Button ID="btnInsert" Text="Insert Text" CssClass="button" runat="server" />;
I have registered the click event on pageload
protected void Page_Load(object sender, EventArgs e)
{
HiddenField1.Value = Guid.NewGuid().ToString();
btnInsert.Attributes.Add("onClick", "Show()");
}
When I run this page it give me error
"Object required"
Object required FormBuilder.aspx, line 644 character 29
Please help me
<div class="ForumMod">modified on Wednesday, June 24, 2009 5:35 AM</div>
|
|
|
|
|
Member 3374813 wrote: Object required FormBuilder.aspx, line 644 character 29
Well, how about telling use what line 644 is ? When do you get this error ? What have you done to debug it ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
When I press the button ("btnInsert") Jscript Debbuger gives me this error on the javascript code statement " var saveText = ctrl.value; " on the line 644 with yellow highlighted.
|
|
|
|
|
ctrl is therefore null. So, I assume that means you're setting it with document.getElementById, and not checking the return value. Odds are that you're using the server side ids instead of using the clientId property to get the client side id's for your script.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I am new to Javascript How I can get Client Side Id in javascript code please
Client side Id for FreeTextBox1 and HiddenField1?
|
|
|
|
|
Member 3374813 wrote: var ctrl = document.getElementById("txtTargetText");
Member 3374813 wrote: ange.text = document.getElementById("txtSourceText").value;
document.getElementById("txtTargetText").focus();
Hope you have above elements in HTML code. If you have describe it more.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
Sorry I have posted old html
txtsourceText is id of HiddenField i.e HiddenField1 in html
txtTargetText is id of FreeTextBox i.e FreeTextBox1 in html
|
|
|
|
|
Post your new code or modify the existing one plz
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
I have modified the javascript code as I have currently on my side. It is now correct. I am waiting your help please.
|
|
|
|
|
Which browser are you using ? It works fine in IE but firefox. It seems detecting text selection in firefox[^] is different. It may fail because of this reason.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
Member 3374813 wrote: var ctrl = document.getElementById("txtTargetText");
where is txtTargetText in your source code?
himanshu
|
|
|
|
|
Replace first line of show function with below code
var ctrl = document.getElementById('<%=FreeTextBox1.ClientID%>');
It might help you.
|
|
|
|
|
Thank you very much.
I have received this error message on the next line of my javascript code
Error:
Can't move focus to the control because it is invisible, not enabled, or of
a type that does not accept the focus. FormBuilder.aspx, line 651 character 9
Line of Code:
ctrl.focus();
|
|
|
|
|
Make sure that your text box control(FreeTextBox1) is enabled and visible. if not then first enable it then set the focus otherwise it gives an error.
|
|
|
|
|
Private Sub DeleteMultipleRecords(ByVal idCollection As StringCollection)
'Create sql Connection and Sql Command
Dim con As New SqlConnection(strConnection)
Dim cmd As New SqlCommand()
Dim IDs As String = ""
For Each id As String In idCollection
IDs += id.ToString() & ","
Next
Try
Dim test As String = IDs.Substring(0, IDs.LastIndexOf(","))
Dim sql As String = ("Delete from Categories" & " WHERE CategoryID in (") + test & ")"
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.Connection = con
con.Open()
cmd.ExecuteNonQuery()
Catch ex As SqlException
Dim errorMsg As String = "Error in Deletion"
errorMsg += ex.Message
Throw New Exception(errorMsg)
Finally
con.Close()
End Try
End Sub
|
|
|
|
|
KhandelwalA wrote: Dim sql As String = ("Delete from Categories" & " WHERE CategoryID in (") + test & ")"
What error are you getting ?
|
|
|
|
|
When I selet a Single row through checkbox then error is :-
Error in DeletionIncorrect syntax near ')'.
When I selet a more than one row through checkbox then error is :-
Error in DeletionIncorrect syntax near ','.
|
|
|
|
|
Dim sql As String = ("Delete from Categories WHERE CategoryID in (" & +test & ")")
|
|
|
|
|
Well, there's many errors here
1 - you asked in the wrong forum
2 - string mashing SQL is never wise
3 - you don't tell us why you think there's an error
I would use the debugger in this situation to read the sql, then look at it and try it in the query analyser to work out what is wrong.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I am using ASP.NET Gridview control with Object Data Source inside an ajax toolkit's update panel.Row Command Event does not get fired for first time after laod. After that it works fine???
|
|
|
|
|
HI,
If I am posting this in wrong category please advice me the right one. I am really not sure...
Here is the problem i have,
I have a PDF document that has
1. intranet link (http://server/guideline.aspx)
2. internet external link (http://www.google.com)
3. physical link to a file in a server (file:\\localserver\shared\guideline.html)
When I open this PDF file in adobe all of the above 3 links works very fine and take me to the right page/document.
When I open this PDF file in IE all of the above 3 links wokrs very well and takes me to the right page/document.
But in my .NET 2.0 C# application I am trying to open this up by a aspx page using iFrame, it opens up very well and first 2 links works very well. When i click the third link I am receiving "Page cannot be found" error. I checked the property of this page and looks like IE is trying me to open up
http://localhost/localserver/shared/guideline.html
instead of
file:\\localserver\shared\guideline.html
I spent 3 days finding a answer to this problem But no luck.
Here is the code in side aspx page:
<body id="bdContent" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" runat="server">
<form id="Form1" method="post" runat=server >
<iframe id="frmBrowser" marginWidth="5" hspace="0" vspace="0" src="medseed.htm"
width="100%" height="100%" runat="server" scrolling="auto">
</iframe>
</form>
</body>
This is the code I am using to load the PDF file dynamically,
string script = String.Format("<script>document.all.frmBrowser.src='{0}';</script>", url);
RegisterStartupScript("scriptBreakframe", script);
Here url is the the actual URL for PDF something like this http://localhost/workingproject/guidleine/linksfile.pdf
Anyone faced this problem before?? Please please.. anyone know the solution?
THanks in advance for your valuable time.
Cheers
Renu
|
|
|
|
|
Please shed some light.. please please...
Renu
|
|
|
|