|
Hi,
I created a web application in c# to create a record with attachment. While creating a new record I have an option to create an attachment on a separate window? What I am doing is once the user click the attachment button I automatically create a header record then from the new window upon saving the attachment I created the detail information using a temporary primary key. When its time to save and press the SUBMIT button, I update the primary key to a standard primary key that is readable to the users.
Please tell me if what I am doing is correct, or if you have any suggestion on how implement in a correct way.
DRAWBACK: After pressing the attachment button (It means I create a header record) the user will change his mind an abort everything that he is doing and just close the window. I will have 1 record from the database (garbage).
/Dabuskol
|
|
|
|
|
Is it possible to identify which control is on a form. For example can i return a string which saya that there is a textbox control on a form, etc.
|
|
|
|
|
Use FindControl method
HVP
|
|
|
|
|
You can also use the Controls property of the Form class for this purpose. It returns an object of the Control.ControlCollection class whose members can be used for the purpose desired by you.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
Hi
Can anyone help me with this problem.
------------------------------
PDA Transportes.exe
TypeLoadException
FormTransMain::.ctor+0x2c
FormTransMain::Main+0x5
------------------------------
This happens on an application that uses a library that uses Web Services.
And i allready made debugging of the problem, the error comes when calling
the web services.
This occurs in the emulator of VS2003 and in the Pocket Pc.
Both library and application where built on C#.
I reall don't what to do anymore.
Thanks for all the help.
|
|
|
|
|
Usually this comes when the type's static constructor throws an exception.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hye there. I need to hide the column of datagrid. the story is I am fetching the record from one table containinng primary keys and some other information which I need for processing at latter stage but dont want to show it to user. Can any one tell me how to do it. Plus need change the caption of the columns with out changing the names in DataTable
any support would be appreciated.
thanks in advance.
|
|
|
|
|
Hi,
Just make the column visible=false. You can still use the value of that column though it's invisible. You can use the E.Item.Cells[x].Text to get the current value.
Other way is to Grid.Columns[1].Visible = false;
/Dabuskol
|
|
|
|
|
I think you are using any third party data grid. I was talking about the Dot net DataGrid in Visual Studio 2003. there isnt any property like you mentioned.
please have a look and let me know if I am missing any thing.
regards
|
|
|
|
|
There are two ways to do it.
(1) Create custom table style. And dont add DataGridTextBoxColumn for the columns you dont want to display.
http://www.codeproject.com/cs/miscctrl/noogenwinforms.asp
(2) You can use your DataSet's ColumnMapping property to hide a column.
// Creating connection and command sting
string conStr = @"Provider=Microsoft.JET.OLEDB.4.0;data source=C:\northwind.mdb";
string sqlStr = "SELECT * FROM Employees";
// Create connection object
OleDbConnection conn = new OleDbConnection(conStr);
// Create data adapter object
OleDbDataAdapter da = new OleDbDataAdapter(sqlStr,conn);
// Create a dataset object and fill with data using data adapter's Fill method
DataSet ds = new DataSet();
da.Fill(ds, "Employees");
// Hide the column and attach dataset's DefaultView to the datagrid control
ds.Tables["Employees"].Columns["LastName"].ColumnMapping = MappingType.Hidden;
dataGrid1.DataSource = ds.Tables["Employees"];
|
|
|
|
|
Hi,
Im not using any third party its part of the C# .net datagrid controls.
Please follow this link, it has everything you need to know about datagrid.
DataGird Girl[^]
Hope this would help you.
Good Luck.
|
|
|
|
|
Hi.. sorry if this is counted as a double loop.
My situation is i wanna seen a string though serial but with the enter key..<cr>
but right now is i sent use what i type in a textbox(words i type +enter key)
then click sent..
the send button is open()-> write () read () then close().
so how guys..
secondly i have another.. problem..
the program is link to a PLC and whenevrer i sent a order command using series, it wil reply me.. but the problem is i only reply some time.. even with e same command..
What can be the pro?
or should i start a thread just for listening?
private void btnSent_Click(object sender, System.EventArgs e)<br />
{ <br />
line.Open(); <br />
<br />
string SentString = txtbox.Text ; <br />
ArrayByte_Data = new byte[SentString.Length];<br />
for( int i = 0; i < SentString.Length; i++ )<br />
{<br />
ArrayByte_Data[i] = Convert.ToByte(SentString[i]);<br />
<br />
}<br />
line.Write(ArrayByte_Data); <br />
<br />
string ReplyString;<br />
ReplyString = Encoding.ASCII.GetString(line.Read(10));<br />
txtStatus.Text=ReplyString;<br />
line.Close();<br />
<br />
<br />
}
this is my send code..
pls advice
|
|
|
|
|
i am working with c#.net Console application.
i m using the following code snippet
NavigateDocumnet()
{
object o = null;
// some code here
// Every time "NavgateFile" value is changed"
m_WebBrowser.Navigate(NavigateFile,ref o,ref o,ref o,ref o);//problem is here
// some code here
NavigateDocument(); // Recursive funtion
}
in Document_Completed
{
mshtml.IHTMLDocument2 doc=(mshtml.IHTMLDocument2)m_IExplorer.Document;
mshtml.IHTMLElement BodyElement=doc.body;
//Retrieve all Text from Body Tag
string BodyText=BodyElement.innerText;
// writing text into file
}
Now my problem is that every time when m_WebBrowser.Navigate(NavigateFile,ref o,ref o,ref o,ref o) is called it did not wait for document complete. it called continuesly without wait for document complete. for example if Recursive loop call 10 time. documnet complete is called only 2 or 3 times. first time it called for 1 page after that it skip some address and then it called for 5 0r 6 page and then so on........
i want every when m_WebBrowser.Navigate(NavigateFile,ref o,ref o,ref o,ref o) is called it wait for document complete and then Navigate another address and so on.......
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
I got a question for you, why you using webbrowser control in C# console applicaion?
- ashish
|
|
|
|
|
Sorry its not a Web Browser Control . Its internet Explorer . i used the following coding
m_IExplorer = new SHDocVw.InternetExplorer()
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
For what you are using Internet explorer from Console Application?
- ashish
|
|
|
|
|
Could someone please tell me how to convert existing form data(say data in a textbox) into XML on the basis of a already created XSD. Basically how do you associate an XSD to u're C# code.
|
|
|
|
|
|
How do i charge credit cards for like a resturant program?
|
|
|
|
|
|
you need to create a vendor account with service provider like Verisign. they will provide you few APIs using which you will be able to charge customers through creditcard.
It is recomended that you use SSL for communication and do not store credit card details. If you are really interested in saving details, do encrypt before you save.
- ashish
|
|
|
|
|
I have 2 Applications say App A and App B
App A is Offline and App B is online coded in ASP,COM+
App A has to download some data from the Database
I have a function written in webservice (Login)
Here i will have to get the sessionid from the server also I will have to check whether App A has windows Authentication or Anonymous Login and then I will have to download. How will i write the functionality for Windows Authentication or anonymous login in the Webservice Login Function
pavan
|
|
|
|
|
|
How does output caching work in ASP.NET?
|
|
|
|
|