|
You say you want to do the following:
"is there any way to use the "Copy and Paste" method without errors?"
But why do you need to do this?
|
|
|
|
|
|
Why are you always making a backup of the directory!!??
Why do you need to keep doing the above method??
What happens if you dont?
Im failing to understand why you need to keep
Mohammed Gouda wrote: restore a backup of my code to the Virtual Directory
|
|
|
|
|
|
Yeah but you found a solution to it didnt you? Thats what you said in your first post
Why try and find another solution when the likely hood of it happening again is slim?
Or did you mistype your first post, and you actually mean you havent found a solution?
|
|
|
|
|
what is the format of path in this code:
System.IO.StreamWriter sw = new System.IO.StreamWriter("?????")
can anybody give me a example?
|
|
|
|
|
What you are trying to do ?
IT takes Stream as an argument There 6 to 7 different constructors
Let me know what are you trying with it ?
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... "
|
|
|
|
|
i want to do this:
string old = "HTML code";
if (!System.IO.File.Exists("d:\\a.htm"))
{
System.IO.FileStream f = System.IO.File.Create("d:\\a.htm");
f.Close();
using (System.IO.StreamWriter sw = new System.IO.StreamWriter("d:\\a.htm"))
{
sw.Write(old);
}
}
}
and i want open a.html form with this cde:
"<A HREF=" + "javascript:window.open('a.htm')"
but not open a.htm , it open other page.
can i say my mean?? do u understand my mean?/
|
|
|
|
|
Here you are creating a Html file at server side ok
Now you want to open that html file at client side
That not possible dude. i think you have been trying in wrong direction
you will have to create a html file using javascript only at client side
then you can open that file using javascript
Is that fine or i interpreted wrongly
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... "
|
|
|
|
|
System.IO.StreamWriter sw = new System.IO.StreamWriter(@"PATH OF THE FILE")
e.g System.IO.StreamWriter sw = new System.IO.StreamWriter(@"C:\test.txt")
|
|
|
|
|
thanks thats right. and now
how can i open C:\test.txt with this code : javascript:window.open('c:\test.txt') ???? is it right???
|
|
|
|
|
public static Control AdvancedFindControl(this Control container, string controlId)<br />
{<br />
Queue<control> controlQueue = new Queue<control>(new[] { container });<br />
Control currentControl;<br />
<br />
while (controlQueue.Count > 0)<br />
{<br />
currentControl = controlQueue.Dequeue();<br />
<br />
foreach (Control child in currentControl.Controls) { controlQueue.Enqueue(child); }<br />
<br />
if (currentControl.ID == controlId)<br />
<br />
return currentControl;<br />
}<br />
<br />
return null;<br />
} <br />
</control></control>
thanks in adv
|
|
|
|
|
try this website, there are plenty more out there
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
|
|
|
|
|
sorry but the foll line doesn`t seems to convert
Dim controlQueue As Queue = New Queue(New(){container()})
|
|
|
|
|
Public Shared Function AdvancedFindControl(ByVal Control As Me, ByVal controlId As String) As Control
Dim controlQueue As Queue = New Queue(New()
{
container
}
)
Dim currentControl As Control
While controlQueue.Count > 0
currentControl = controlQueue.Dequeue()
Dim child As Control
For Each child In currentControl.Controls
controlQueue.Enqueue(child)
Next
If currentControl.ID = controlId Then
Return currentControl
End If
End While
Return Nothing
End Function
|
|
|
|
|
This is not valid C# code - you're missing a type name after 'new':
...new Queue(new[] { container });
I would expect something like:
...new Queue(new Foo[] { container });
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
Java to VB & C# Converter: convert Java to VB or C#
|
|
|
|
|
Whoa ... posted too soon - this is valid C# syntax - I'm working on the VB equivalent - stay tuned.
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
Java to VB & C# Converter: convert Java to VB or C#
|
|
|
|
|
Apparently, there is no VB equivalent to an inferred array initialization (e.g., "new[] {...}" in C#3)
The following was produced with Instant VB, with one manual adjustment - adding "Control" after the 'New':
<System.Runtime.CompilerServices.Extension> _
Public Shared Function AdvancedFindControl(ByVal container As Control, ByVal controlId As String) As Control
Dim controlQueue As New Queue(New Control() { container })
Dim currentControl As Control
Do While controlQueue.Count > 0
currentControl = controlQueue.Dequeue()
For Each child As Control In currentControl.Controls
controlQueue.Enqueue(child)
Next child
If currentControl.ID = controlId Then
Return currentControl
End If
Loop
Return Nothing
End Function
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
Java to VB & C# Converter: convert Java to VB or C#
|
|
|
|
|
Hi!!
I am using Javascript in user control.. My problem is i am not getting the value of textbox in javascript.
here is my code
function InputChange()
{
var ctl=document.getElementById('txtEmp').value;
alert(ctl);
}
<asp:TextBox ID="txtEmp" onchange="InputChange();" runat="server" CssClass="form_textbox" Width ="80px"></asp:TextBox>
its displaying 'ctl' value as 'null'
please help me ASAP...
Thanks in Advance...
|
|
|
|
|
Its because when you are using User Control or anything ASP genrate a unique client id to every control you are giving wrong i Id i guess
unction InputChange()
{
var ctl=document.getElementById("<%=txtEmp.ClientID %>").value;
alert(ctl);
}
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... "
modified on Tuesday, April 22, 2008 3:41 AM
|
|
|
|
|
Thanks a lot sandeep... its working.... thank u very much....
|
|
|
|
|
Most likely the id of the control on the emitted page is actually something like: ctl00_master_txtEmp or similar. Look at the source to find this: it is named after the parent element (such as the ContentPlaceHolderID). As an example right click this page, click view source and you will see many examples of this.
Your code would then be:
var ctl=document.getElementById('ctl00_master_txtEmp').value;<br />
alert(ctl);
|
|
|
|
|
Its better to give a client id dynamic instead of static
Check my above modified code that will work
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... "
|
|
|
|
|
Hi,
I have 2 different database. Both are in mssql. I want code to map tables and columns of these two diferent databases.
Can u please help me?
Thanks and regards,
Arti Khachariya
|
|
|
|
|