|
1. It's a practice in a class
2. there is no forum for ASP3 here
3. If you can't help, don't post anything, please!
Best wishes
|
|
|
|
|
1 - any class that wanted to teach me asp in 2007, I would drop immediately, and let the teacher know they are stupid. No-one uses that rubbish anymore, unless it's legacy apps.
2 - There is a web development forum for outdated technologies such as ASP and PHP
3 - actually, you're far more likely to get help if you post in the right place, so I *am* helping.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi all
I want to create a web form.In this form I have a data Grid(GridView1). This grid view contains some rows that fetch from a table of a database.I want to insert a button at the last column of each row, This button must update a row which selected which but I don't know how to insert this button and how to write click event for each button
|
|
|
|
|
Hi,
I'm wondering,did u mean that u want a button each row in last column, and u want that event button able to update value on row selected?
maybe u can checked the enable edit checkBox on u're gridview and set the properties to a button..so when the edit button pressed it allow user to change/update value on the selected row
Hope that answer u're question
Regards,
Tomi
|
|
|
|
|
Yeah I mean a button each row in last column, and I want when user click each button update value on selected row, but I don't know how to reach this goal.I use auto format of data grid(VS 2005)but I don't know how to set.
|
|
|
|
|
1.First expand properties of data grid (little arrow on top right corner) it will show some properties like : auto format, etc..
2. find the checked box at that properties (enable editing, enable deleting, enable select, and etc..)
3. checked the checkbox which enable editing..and maybe if u want to enable the other just click the checkbox
4. after u checked the properties, find a link name Edit if u checked the checkbox for enabled the editing, and link Delete if u enable deleting in your data grid..
5. on the runtime that link will allow user to update the data of the selected column
6. if u want to make this link to be a button or naming the link,just change the properties and change it like u want to be
Hope this can help u
Regards,
Tomi
|
|
|
|
|
Hello
this my code:
<asp:repeater id="myRepeater" runat="server">
<headertemplate>
<itemtemplate>
What i try to do is to write in the Label where i put the text: "dddddddddd" to have a real data from a Session or maybe from the same Querry the repeater is fill
Tanks in advance
Assaf <asp:label runat="server" id="LblName" text="dddddddddd"> | Grade Name | Institution Name | <%#DataBinder.Eval(Container.DataItem, "GradeName")%> | <%#DataBinder.Eval(Container.DataItem, "InstitutionName")%> |
|
|
|
|
|
You seem to have not checked 'Ignore HTML tags in this message (good for code snippets) and htmlised half your code.
One way to do this is to set the Text to get it's value from calling a method, or you could just use the code inline, in a server code block. This works the same way as the DataBinder.Eval, just replace it with Session["mykey"].ToString() or something ( a method which checks if the value is null is obviously better )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, in the code below the IF statement is used for multiple selection of list items in a list box. The select statement is supposed to select the CarID and the Model fields From the table CarTB, where the value of the field Make equals the text value of the list item in my list box that has been selected.
Dim DS As New DataSet
For i = 0 To CarNamesDL.Items.Count - 1
If CarNamesDL.Items(i).Selected Then
BConn = New OdbcConnection("Driver={MySQL ODBC .51Driver};Server=myServer;Database=CarCompaniesDB;User=myUserassword=myPass;Option=3;")
DBCommand = New OdbcCommand("SELECT CarID, Model From CarTB where Make = '" & CarNamesDL.Items(i).Text & "'", DBConn)
End if
Next
I get the error "Character constant must contain exactly one character" and visual studio is saying that the select statement is the cause. Please take a look and explain to me what I did wrong in the select statement. Thank you in advance for your help.
|
|
|
|
|
Apart from not protecting yourself from SQL Injection ?
ASPnoob wrote: User=myUserassword=myPass;
I assume this should be User=myUser;Password=myPass; ??
Does MySQL use single quotes for strings ? Perhaps it's assuming that ' is for a char, and so it's complaining that there's more than one character in there ? MySQL sucks.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi ,
I'm using a web service to copy file to a network folder restricted to a specififc username & pwd.
I tried
<identity impersonate="treu" username="domain\user" password="pwd">
It did not work.
Thanks in advance
Priya
|
|
|
|
|
|
What web service ? What did you try ? How does it not work ? What advice were you hoping for, based on this vague post ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I'm using .NET web service. I wanted my web service to run on specific user account. When i tried <identity impersonate="true" username="<domain\user"> password = <password> > in web.config it does not work.
Pls advise.
thanks,
Priya
|
|
|
|
|
Hi.I want to show the images in the datagrid.i want to bound the datasource into datagrid.the method i used for retrieving images is written down.using this method am getting other fields.i add one template column in the datagrid and add one image control in that item template,the template column datafield given this sql image column name.sql image datatype is Image.i want to show all the images in the datagrid.
public static DataSet getImages()
{
DataSet ds = new DataSet();
using (SqlConnection conn = new SqlConnection(connectionString))
{
using (SqlCommand cmd = new SqlCommand("SPOC_PHOTOS_SELECT", conn))
{
cmd.CommandType = CommandType.StoredProcedure;
using (SqlDataAdapter da = new SqlDataAdapter())
{
da.SelectCommand = cmd;
try
{
conn.Open();
da.Fill(ds);
return ds;
}
catch (Exception e)
{
throw e;
return null;
}
finally
{
conn.Close();
}
}
}
}
|
|
|
|
|
Hi
I'm trying to write a web project using ASP.Net 2.
I have IIS 5.1 and ASP.Net 2 installed.
I've registered asp.net in my IIS but every time I want to browse to a directory under my IIS default web site I get a 403 error that says "You are not authorized to view this page."
I tried to browse iisstart.asp under default web site using IE 6 and I got this error:
Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'GetObject'
/localstart.asp, line 40
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; FDM; .NET CLR 2.0.50727)
Page:
GET /localstart.asp
I'm totaly confused about this error and I can't understand why it happens.
Please help me.
Thanks a lot.
-- modified at 18:35 Friday 27th July, 2007
|
|
|
|
|
|
Sounds like permission problem...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I'm adding table rows dynamically and inside the cells for each row i'm adding a textbox,label and an imagebutton. I have event handler for the imagebutton click event and I would like to get the row of the clicked imagebutton so I can remove this row from the table.
Please good people, someone help!
|
|
|
|
|
You can work out which button was clicked in the event, and store the Id in the tag of the button.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks, I managed to get hold of the row by getting the parent of the imagebutton and (the cell) and accessing the row through the cell.
BUT
I'm now having probblems with persisting the dynamically added rows after postbacks, any help please!!
|
|
|
|
|
Hi there
I have done this type of work in my application.
I take one field in datatbase table to store row and cell no.
just like as "NoOfRow_NoOfColumn": 1_1,1_2,1_3,2_1,2_2,2_3.......
I have aslo take NoOfRow and NoOfColumn field to identify how many rows and column are there.
Now when I want to add new row,fisrt I take NoOfRow and increament it by 1 and looping trough NoOfColumn and Add New ROw.
Same thing for adding new Column.
Now In your case U just have to need to identify cell no.
If U have ImageButton on Every Each Row then give ROws Id to Image Button and pass it when click event fire and after that U can Delete selected rows.
Best Of Luck
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
I have the following application, I need to supply a username and a password to perform my http-post and don't understand where to start with that can someone look at the following code and point me in the write direction or an example. Thank you
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Web;
using System.IO;
using System.Security.Cryptography.X509Certificates;
namespace postDT
{
class SimpleHttpClient
{
//private string GetPostdata()
//{
// string boundary = "boundary=---------------------------7d2e2c76e104be" + this._Boundary;
// int arrRegs = this._ParamsCollection.Count * 5;
// string[] auxReqBody = new string[arrRegs];
// int count = 0;
// foreach(ParamsStruct par in this.ParamsCollection)
// {
// auxReqBody[count] = boundary;
// count++;
// switch (par.Type)
// {
// case ParamsStruct.ParamType.File:
// {
// auxReqBody[count] = "Content-Disposition: file; name=\"" + par.Name + "\"; filename=\"" + par.GetOnlyFileName() + "\"";
// count++;
// auxReqBody[count] = "Content-Type: text/plain";
// count++;
// auxReqBody[count] = "";
// count++;
// auxReqBody[count] = par.StringValue;
// count++;
// break;
// }
// case ParamStruct.ParamType.Parameter:
// default:
// {
// auxReqBody[count] = "COntent-Disposition: form-data; name=\"" + par.Name + "\"";
// count++;
// auxReqBody[count] = "";
// count++;
// auxReqBody[count] = par.StringValue;
// count++;
// break;
// }
// }
// }
// auxReqBody[count] = boundary;
// count++;
// string requestBody = String.Join("\r\n",auxReqBody);
// return requestBody;
//}
[STAThread]
public static void Main(string[] args)
{
string gatewayUrl = "https://www.qa.dealertrack.com/DealerFeed/DealerFileUpload.asp";
string inputFilePath = "Z:/ZQ1412JPM/dealers.csv";
string DERCertFilePath = "C:/Documents and Settings/rbreault/Desktop/qa.dt.cer";
HttpWebResponse resp = null;
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(gatewayUrl);
Console.WriteLine("Connecting to URL: " + gatewayUrl);
// Read DER encoded client certificate and attach it to request object
// so it can be passed to the gateway as part of the SSL handshake
X509Certificate clientcert = X509Certificate.CreateFromCertFile(DERCertFilePath);
request.ClientCertificates.Add(clientcert);
// Read input from file
string inputData;
using (StreamReader inputFileReader = new StreamReader(inputFilePath))
{
inputData = inputFileReader.ReadToEnd();
}
Console.WriteLine("input file value:");
Console.WriteLine(inputData);
// encocde post data and set up the request NOTE: input data is passed as a parameter named 'boundry'
string postData = "boundry=---------------------------7d2e2c76e104be" + inputData + "-----------------------------7d2e2c76e104be--";
byte[] postDataBytes = Encoding.UTF8.GetBytes(postData);
request.Method = "POST";
request.ContentType = "multipart/form-data";
request.ContentLength = postDataBytes.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(postDataBytes, 0 ,postDataBytes.Length);
requestStream.Close();
// get response and write to console
resp = (HttpWebResponse)request.GetResponse();
Console.WriteLine("Got a response from the file Gateway, response:");
StreamReader responseReader = new StreamReader(resp.GetResponseStream(), Encoding.UTF8);
Console.WriteLine(responseReader.ReadToEnd());
resp.Close();
}
catch(Exception e)
{
Console.WriteLine( e.ToString());
Console.WriteLine("\r\nThe request URI could not be found or was malformed");
}
finally
{
if ( resp != null )
{
resp.Close();
}
}
}
}
}
|
|
|
|
|
What exactly is your problem?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I get a 401 error. I need to pass a username and password but I am unsure where to add it to my code.
|
|
|
|