|
Can anyone point me to any good developer guides to getting started with WPF/e? All I seem to come up with are millions of blog hits that all point back to the video/paper on playing with a soft-drink can. I want to start looking at developing web applications, not media, using this platform.
|
|
|
|
|
Brady Kelly wrote: All I seem to come up with are millions of blog hits
Didn't you know - that's M$' new documentation method - just let the bloggers do it
Seriously though, I struggled, and couldn't really find much, so just started playing - seemd to do the trick
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi everyone,
I'm having with selecting a row in a datagrid. I have a datagrid that is ment to update and it runs very well, But I don't want the user to keep scrolling when ever they want to update so I created a textbox(txtname) and a button where a user is supposed to write a name and by the click of the button the corresponding row is selected. Now where the problem is it's that when I write a name say Ndayahundwa,Claude and press button I get this error:
Incorrect syntax near 'Ndayahundwa'. Here is the code I'm using:
SqlCommand myCommand = new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="select * from isp_email.staff where @fullname like%" +txtname.Text+ "%";
SqlParameter myparam = new SqlParameter("@fullname",SqlDbType.Text);
myparam.Value=txtname.Text;
myCommand.Parameters.Add(myparam);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds);
dgupdate.DataSource=ds;
dgupdate.DataBind();
Could some one bail me out?
Thanks.
|
|
|
|
|
This line:
nclauder wrote: myCommand.CommandText="select * from isp_email.staff where @fullname like%" +txtname.Text+ "%";
Should be written as:
"select * from isp_email.staff where fullname like @fullname"
and add the % signs to the ends of your parameter. This is providing that fullname is a field in your table.
|
|
|
|
|
Thanks Paddy,
I tried it but it couldn't work but I tried this and it could only bring the header text do you think i'm missing something?
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();
Thanks again.
|
|
|
|
|
You've got the wrong end of this - this is not how SQL parameters work. They are not concatenated into the text, e.g.:
<br />
SqlCommand myCommand = new SqlCommand("select * from staff where fullname Like @txtname",con); <br />
<br />
SqlParameter myparam = new SqlParameter("@txtname",SqlDbType.Text);<br />
<br />
myparam.Value= "%" + txtname.Text + "%"; <br />
<br />
myCommand.Parameters.Add(myparam);<br />
<br />
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);<br />
<br />
DataSet ds = new DataSet();<br />
myAdapter.Fill(ds); <br />
You also seem to be opening your connection after the call to myAdapter.Fill?
|
|
|
|
|
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.
|
|
|
|