|
Thanks very much it has actually worked though when a column is selected and I press edit, It first brings back the whole table and I have to press again ok and it comes back in the editable stile. but it Edits properly.
do you think there is something wrong or thats how it's supposed to be?
thanks
|
|
|
|
|
That doesn't sound quite right, but without more details it's hard to say...
|
|
|
|
|
here is a datagrid that is supposed to edit and previously I was creating where a user can be able to select a name and update one row by one. But this time it makes a lomg process like I've just explain the user will press ok afteg writing the name the row will be selected as expected and when the edit is pressed the whole table appears with the 1st row on teh table in motion of being edited, but when the user presses ok for the second time the column that is supposed to be edited will be selected in the write form of being edited and the user will edit it will be edited properly. I don't Understand Why When the user presses edit the whole table appears. If this can not help let me show you how the code goes.
private void bttok_Click(object sender, System.EventArgs e)
{
SqlCommand myCommand = new SqlCommand("select * from isp_email.staff where fullname Like @txtname",con);
SqlParameter myparam = new SqlParameter("@txtname",SqlDbType.Text);
myparam.Value="%"+txtname.Text+"%";
myCommand.Parameters.Add(myparam);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds);
con.Open();
dgupdate.DataSource=ds;
dgupdate.DataBind();
con.Close();
}
public void Edit_dgupdate(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgupdate.EditItemIndex = e.Item.ItemIndex;
BindDataGrid();
}
public void Cancel_dgupdate(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgupdate.EditItemIndex = -1;
BindDataGrid();
}
public void Update_dgupdate(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
System.Web.UI.WebControls.DropDownList st=new System.Web.UI.WebControls.DropDownList();
st=(System.Web.UI.WebControls.DropDownList)e.Item.Cells[2].FindControl("ddlst");
System.Web.UI.WebControls.TextBox stl=new System.Web.UI.WebControls.TextBox();
stl=(System.Web.UI.WebControls.TextBox)e.Item.Cells[1].Controls[0];
System.Web.UI.WebControls.TextBox stf=new System.Web.UI.WebControls.TextBox();
stf=(System.Web.UI.WebControls.TextBox)e.Item.Cells[0].Controls[0];
string dll = st.SelectedItem.Value;
SqlCommand myCommand=new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="update isp_email.staff set stafflevel=@stafflevel where ID=@id";
myCommand.Parameters.Add(new SqlParameter("@stafflevel",SqlDbType.Char,45));
myCommand.Parameters["@stafflevel"].Value=st.SelectedValue;
myCommand.Parameters.Add(new SqlParameter("@id",SqlDbType.Char,45));
myCommand.Parameters["@id"].Value=stl.Text;
myCommand.Parameters.Add(new SqlParameter("@Name",SqlDbType.Char,45));
myCommand.Parameters["@Name"].Value=stf.Text;
con.Open();
myCommand.ExecuteNonQuery();
con.Close();
dgupdate.EditItemIndex=-1;
BindDataGrid();
}
Thanks
|
|
|
|
|
If txtName is a textbox within a row in the datagrid, you won't be able to access it this way?
|
|
|
|
|
txtname is a textbox that is on the web form and it's supposed to refer to a textBox in the datagrid. is there some thing wrong?
Thanks
|
|
|
|
|
I want pagging code ( of search results ) in php like in tahoo mail inbox
for exp ( 3 records out of 120 first previ next last ) this should be come instade of page numbers. plz help me
Bharat Bhusanam
|
|
|
|
|
I am dynamically creating elements (divs to be specific) and wish to add on onmouseover event to the element before I add it to the page. What I have so far is basically this:
// Create New Div
var newDiv = document.createElement('div');
// Add ID
newDiv.id = myID;
// Add CSS and innerHtml
newDiv.className = 'myBox';
// Add Attribute NOTE: Does Not Work in IE
newDiv.setAttribute("onmouseover", "myFunction('" + myID + "')";
// Add Div to document
document.body.appendChild(newDiv);
This works perfectly well in Firefox and Opera, but when it comes to IE7, no dice. Any suggestions?
I've also tried this:
myDiv.onmouseover = "myFunction(" + myID + ");";
Also to no avail.
thanks
|
|
|
|
|
Hi,
I am building an ASP.NET(2) app and am using IIS(6) on W2K3. In one of my pages I need to call an external executable (pass it some arguments and get the result back). But when I run the webapp, the program doesn't execute. On debugging it says "Access not allowed".
I doubt it's not ASP.Net issue rather an IIS issue but am not sure. I tried almost every thing I could find through Google but no good. Any help in this regard would be highly appericiated.
Here is the code I wrote:
<br />
Process proc = new Process();<br />
string file = @"Bin\kuma.exe";<br />
proc.StartInfo.FileName = file;<br />
proc.StartInfo.Arguments = "arg1 arg2 arg3";<br />
proc.StartInfo.UseShellExecute = false;<br />
proc.StartInfo.RedirectStandardInput = false;<br />
proc.StartInfo.RedirectStandardOutput = true;<br />
proc.StartInfo.CreateNoWindow = true;<br />
proc.Start();<br />
<br />
<br />
StreamReader output = proc.StandardOutput;<br />
string txt = output.ReadToEnd();<br />
Trace.Write("txt" + txt);<br />
Thanks and regards.
|
|
|
|
|
You must give permission to the process that is running the website such as IUSR_<machinename> to the location of the executable.
Cleako
|
|
|
|
|
Hi,
I have already tried this. Also I have allowed "all unkonwn cgi extensions" in web services extensions tab in IIS manager but to no avail.
|
|
|
|
|
Did you ever get this solved?
I have an ASP.NET that needs to create some files on the server, then zip them up and send them to the client. Do you have any suggestions?
Thank you
Tom
|
|
|
|
|
Yes. It was a long time ago but I think the issue was in fact regarding the execute permissions. After giving the network service account execute permission on the exe, it worked fine.
I am not sure about your particular case. You can enable gzip compression in IIS or if you specifically want to send .zip archive, you can use some command line tool like rar.
HTH,
Aaron.
|
|
|
|
|
Hi there.
I'm just wondering why ISO 8859 character encoding (that in fact uses 8 bits to represent a set of 256 unsigned characters compared to the 127 unsigned ASCII) is sometimes incorrectly called "8-bits ASCII"???
It's just a technical question, but i read yesterday a tech paper and i have that question in mind now.
Regards,
"I hated myself... no, I hated my place in the world" - From Jerry Maguire
|
|
|
|
|
There are many things that are called ASCII that aren't. Although the term "8 bit ASCII" is technically incorrect, it works for describing an eight bit character set that is based on ASCII. People tend to use things that work rather than things that are strictly correct...
In VB.NET the function for getting the character code for a character is still called ASC, although all strings are now Unicode. Actually it has been called ASC throughout the history of VB (as in any BASIC dialect), but I believe that VB has never ever used strict ASCII for strings.
The term "ASCII code" is often used as a synonym for "character code", although the character set rarely is ASCII any more.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi all,
Could someone plz help ... I'm using ASP in dreamweaver 8 (not vb), I'm trying to split the var aList, but I'm getting the following errers:
aList -> 1,2,3 // Example of how the variable would look like.
Microsoft JScript runtime error '800a138f'
Object expected
logonAcces.asp, line 36
33 var listArray;
34 var aList = rs.Fields.Item("ACTIONLIST").Value;
35 Response.Write("aList -> "+aList+"<br>");
<font bgcolor="#D17264">36 listArray = split(aList,",");</font>
37 Response.Write("listArray -> "+listArray+"<br>");
Thank you in advance....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
function splitActionList(arrayList)
{
var r_act_list = new String;
r_act_list = arrayList.split(",");
return r_act_list;
}
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
listArray = aList.split(",");
---
Year happy = new Year(2007);
|
|
|
|
|
Hi all,
Not sure if this is the right place for this but please help if any one can!
I have created a program which i am deploying with clickonce from a file share on our server,
it installed on 2 clients no problem, but on the third a got the error:
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
and on the forth machine a got the error:
Unable to connect to the remote server
No connection good be made because the target machine actively refused it
On the forth machine i copied the installation folder to the desktop and started it from there without any problem.
Any help would be greatly appriciated.
Many thanks in advance.
|
|
|
|
|
Hi,
My application/website required a file to get downloaded on desktop when user clicks save as button.
I need to open the save as dialog box and to save the file at users desired location.
can anybody give me the piece of code or information in asp.
regards
Rajesh
Life is not easy ,let's make it.
|
|
|
|
|
sorry can't help you with the ASP part, but google the following things:
1. HTTP Headers
2. Content-type (header)
3. Content-disposition (also header)
and that should provide you with a knowledge of what you want to do.
Brad
Australian
-CAUTION-
The previous statement may contain traces of PHP, and by reading this statement you negate the right to vote me down.
|
|
|
|
|
If you are using .NET then place this in the button click event. Im not sure of a JavaScript solution.
Response.Clear()<br />
strPath = strPathLocation<br />
Dim file As System.IO.FileInfo<br />
file = New System.IO.FileInfo(strPath)<br />
Response.ContentType = "application/octet-stream"<br />
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)<br />
Response.AddHeader("Content-Length", file.Length.ToString)<br />
Response.WriteFile(file.FullName)
Hope that helps!
Cleako
|
|
|
|
|
Hi all,
I am using atlas (ajax) in my webpage,which contain textbox,timer and button.
In timer control I am calling function which change the text in textbox.
while tracing in code new value is assigned to textbox but it is not reflected in textbox.
If I call same function on button click this will assign new value to textbox and get reflected in textbox.
Why this is so.
Can anybody help me to solve this issue.
Regards,
Nagraj.
|
|
|
|
|
Where does the value come from, a javascript function ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
im Looking for a way to Get a path to Store in a MySQL database, and then once queried it gives links to paths to open
So lets say the file manual1.pdf is at d:\jobs\ssrw\Building1\Manual\
i wanna be able to store that path , to mysql and then click on it to open manual1.pdf
|
|
|
|
|
Hi there,
which language you want to use to store data in mysql??
|
|
|
|