|
Then System.IO.File.Exists(@"\\servername\folder\filename")
|
|
|
|
|
Hello
How to continue this VB.NET 2003 std / ASP.NET made www-page project? I have made ASP.NET web application that runs when I select "start without debugging". What are the steps to get these www-pages running on server. I have bought a web hotel service and now I would like to put these pages running on their server. What to do next?
|
|
|
|
|
You make a build in release mode, then copy the files and folders from your web folder to the hotel. The files needed are the bin folder, the aspx files and any other files that they use (images, css, web.config, global.asax, et.c.). The .vb files is not needed on the server.
---
Year happy = new Year(2007);
|
|
|
|
|
It does not work yet. Do I need to make a setup project like with windows application? Now I called in start script WebForm1.aspx, but error:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1"%>
|
|
|
|
|
Hi All,
I want to get active textbox back color on focus event and it must get white color when it is not active.So I wrote JavaScript function in .js file and added this on my page.JavaScript Function are given below:
function GetColorOnFocus(target)
{
document.getElementById('target').style.backgroundColor = '#FFFFB0';
document.getElementById('target').style.color = 'Blue';
}
function RemoveColorOnBlur(target)
{
document.getElementById('target').style.backgroundColor = 'Window';
document.getElementById('target').style.color = 'WindowText';
}
Calling in this way:
<input name="txtPassWord" type="password" size="15" onfocus= "GetColorOnFocus('txtPassWord');" onblur="RemoveColorOnBlur('txtPassWord');" />
Is there some problem with my code as if I dont put this in .js file it works properly ow it wont.
Please help....
|
|
|
|
|
varshavmane wrote: function GetColorOnFocus(target)
{
document.getElementById('target').style.backgroundColor = '#FFFFB0';
document.getElementById('target').style.color = 'Blue';
}
function RemoveColorOnBlur(target)
{
document.getElementById('target').style.backgroundColor = 'Window';
document.getElementById('target').style.color = 'WindowText';
}
Calling in this way:
try like this,
function GetColorOnFocus(target)<br />
{<br />
target.style.backgroundColor = '#FFFFB0';<br />
target.style.color = 'Blue';<br />
}<br />
<br />
<br />
function RemoveColorOnBlur(target)<br />
{<br />
target.style.backgroundColor = 'Window';<br />
target.style.color = 'WindowText';<br />
}<br />
<br />
Calling in this way:<br />
<br />
<input name="txtPassWord" type="password" size="15" onfocus= "GetColorOnFocus(this);" onblur="RemoveColorOnBlur(this);" />
|
|
|
|
|
Thanks Mr.Venkatesh.Just made change as folows :
<input name="txtPassWord" type="password" size="15" onfocus= "GetColorOnFocus(this);" onblur="RemoveColorOnBlur(this);" />
Its working now.Thanks again...
|
|
|
|
|
Hello,
i've tried to shutdown my Windows XP via an local ASP.NET website with some well-known methods (like starting shutdown.exe, or with API calls), but they all don't work. Even if i impersonate a user with admin rights, the shutdown does not work (and i get no usefull error messages).
So it seems to be some very special security feature from the IIS or the .NET Framework. But maybe someone knows a workaround for this, or something else which may help me? (Okay, the easiest way would be to implement a windows service, and let it know to shutdown the system, but this really not the nicest way.)
Thanks and Regards,
Bombenleger
|
|
|
|
|
Hi,
I'm just wondering if I'm on the write truck. this code is ment to look
for an ID number in the datagrid that matches the the ID number that is
in the textbox I created.
But it's not selecting neither is it showing me any error. could some
one help me please?
private void bttok_click(object sender, System.EventArgs e)
{
con.Open();
try
{
using (SqlCommand myCommand = new SqlCommand("select * from employee where txtname.text=@id",con))
{
SqlParameter myparam = new SqlParameter("@id",SqlDbType.Text);
myparam.Value=ID;
myCommand.Parameters.Add(myparam);
using (SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand))
{
DataSet ds = new DataSet();
myAdapter.Fill(ds);
datagrid1.DataSource=ds;
datagrid1.DataBind();
}
}
}
catch(Exception err)
{
err.ToString();
}
finally
{
con.Close();
}
}
|
|
|
|
|
It's not showing the error because you are catching it and discarding it. This is a very bad idea.
If you show the error message, you will see that you can not access a value from the table txtname as you haven't included the table in the query. I suspect that it's actually not a table at all, which would mean that the condition in the query doesn't make any sense at all.
---
Year happy = new Year(2007);
|
|
|
|
|
Thanks Guffa,
Actually the table is mentioned it's employee and txtname that is where I'm the user is supposed to put the ID number that is supposed to be compared to the ID in the datagrid so that the row can be selected.
Thanks.
|
|
|
|
|
nclauder wrote: Actually the table is mentioned it's employee
The table that I was talking about is "txtname". When you use "txtname.text" in the query, it means "the field text in the table txtname ".
---
Year happy = new Year(2007);
|
|
|
|
|
Do you sugest I would have done it like this select * from isp_email.staff where @id="+txtname.Text,con);? If so I've tryed it but all in vain. when I Put the name in the textBox and press the button it does not select the row.
Thanks
-- modified at 7:41 Tuesday 9th January, 2007
|
|
|
|
|
Hi, maybe I post my question not on correct board bu plz forgive me...
In my asp.net 2.0 application toolbar of CrystalReportViewer1 control doesn't shows icons.
Shuld I install anything else or what is the problem?
here is the image[^]
Thanks and best regards
|
|
|
|
|
Hi All,
From the Popup window, I wish to return the Selected value to the control in my main page. (ASP.NET 2.0)
So I have passed the Control Name as refernce through QueryString. In the Click event I have fired the below code in C#. But, this script is NOT closing the popup window and assign the value to the control in the parent window.
Waht is the mistake with me?
String returnScript = "";
returnScript += "";
returnScript += "window.opener.document.all['";
returnScript += Request.QueryString["CtrlName"];
returnScript += "'].value = '";
returnScript += strSelectedDate;
returnScript += "';window.close();";
returnScript += "<" + "/" + "script>";
Page.ClientScript.RegisterStartupScript(this.GetType(),"key1", returnScript);
-- modified at 3:39 Tuesday 9th January, 2007
<div class="ForumSig">Regards,
<b>Jay</b> </div>
|
|
|
|
|
Though I don't know what is wrong with the code, I know what could be. And if I'm wrong, my advice is still valid.
1. Don't use document.all. It only works in IE. Even if that's your target browser. Instead use document.getElementsById. And for this, make sure you pass Ctrl.ClientID to the Page.
|
|
|
|
|
how to validate textbox in datagrid if i didn't enter the value in textbox.i dont want to use requiredfeild validator.if press button it sholud show that value should be entered.plzz send me it is very urgent if any body knows it.
|
|
|
|
|
I think u can use javascript for this...
|
|
|
|
|
Dear all
i am making web application using asp.net ,C# (visual studio 2005) with sql2000.
In a web page there is listbox with multiple seelct option. i want to save all selected option of listbox
along with other web page infomation on Save button. What i am trying is first i save all selected item to array list
and then inserting it to the table.
i am assaigning to arraylist as
int count = 0;
string[] names = new string[10];
for (int i = 0; i < Listbox1.Items.Count; i++)
{
if (Listbox1.Items[i].Selected == true)
{
count++;
for (int j = 0; j < 7; j++)
{
names[count] = Listbox1.Items[i].Text;
//Response.Write(@names[j]);
break;
}
}
}
Is it a better approach. or any other way is there so that multiple selecting item can be fetched on save button .
please guide me
thank
regards
imran khan
|
|
|
|
|
Unfortunately the server is down, but here's what I know. I received an error when the page tried to access an Application[variable] that I believe was set earlier in the application.
This application worked in my dev environment, but doesn't work on the production server. One thread I had read mentioned that the background thread is ran as ASP_NET account. If that's the case, wouldn't this account still have access to Application[variable]???
I'm at my wits end. I wish the server wasn't down so I could do some more troubleshooting. Any ideas would be great...
|
|
|
|
|
Hi,
We have a folder on our LAN which is about 11GB in size.
I need to build a web interface to it which will allow users
to search the repository.
This is going to be an indexed based search, which means that
results will be dependent on the content of the files. This in
turn implies that we will need to index the contents first.
The filetypes are: office docs, pdf's and zips.
Any tools? frameworks? or suggestions regarding this?
I've heard of dotLucene, but when I tried it, the stupid tool
did nothing other than delete every file in the folder to be
indexed. Thank god I didn't try it on the actual LAN folder.
Please help. This is really urgent.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
i wana do "Changing Master Pages Dynamically in asp.net". one of my masters page code is
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
public partial class MasterPage2_master
}
}
but in linkbuttons control code error comes .and i m doing this from the tutorial
"http://www.exforsys.com/content/view/1627/354/1/0/"
can anyone check this tutorial and tel me the problem.
Chohan
|
|
|
|
|
The tutorial is bugged in some places, especially when writing the LinkButton_Click event handler. So here's what you have to do:
1. Add two master pages to your website, for example MasterPage1.master and MasterPage2.master. Edit them a you like, but make sure they contain the same number of ContentPlaceHolders.
2. Add a webform, for example Default.aspx, and make sure "Select master page" chechkbox is clicked.
3. When asked for the master page, select one from the earlier created ones.
4. Add two LinkButtons (or regular Buttons) to Default.aspx. Set the Text property as you like, and hook them up with Click event handlers.
5. In one of the Click event handlers write the following:
Session["Master"] = "~/MasterPage1.master";
Response.Redirect(Request.Url.ToString());
while in the other change "~/MasterPage1.master" to "~/MasterPage2.master".
6. Add the following to the page:
protected void Page_PreInit(object sender, EventArgs e)
{
if (Session["Master"] != null)
this.MasterPageFile = (string)Session["Master"];
}
Now run the web site, and test the functionality by clicking the LinkButtons.
|
|
|
|
|
Please can you tell me the path of Global Assembly Cache(GAC).
hi, can you please help me to clarify this doubt.
|
|
|
|
|
GAC path will be like this
C:\[windows root path]\assembly
In my case its
C:\WINDOWS\assembly
|
|
|
|