|
greg_quinn wrote:
frmExhibitions fExhibitions = new frmExhibitions();
fExhibitions.populateExhibitions();
In the first line, you are creating a new instance of the form, and that's the one you are refreshing. What you want to do is to access the existing instance. You could try storing the instance in a public field in your main form class, or if you will only have one instance of that child, in a static field in the frmExhibitions class.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
What I am trying to do is this: take contact information from a database and create a .pst file that can be imported into Outlook.
So far, I have only been able to update the contact information on my own computer. Is there anyway to export that contact info to a .pst with C#?
|
|
|
|
|
I have an MDI child window in which I am updating data. Once this data is updated I need to call a function in another existing MDI child window.
How do I call this function in the other MDI child window?
Thanks
|
|
|
|
|
You need to have a reference to the other child window you need to call. You can have a property or constructor parameter that allows the main form to set the child window reference.
Or, you can have the main form act as a mediator and pass a reference to it to all child forms. The child forms then call methods on the main form, which in turn calls appropriate methods on the child forms.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi, Sir and Madam
Is it possible to get my webpage url and website url
Thank You.
|
|
|
|
|
god4k wrote:
Sir and Madam
Both!? There is only one person I know that could fit both, and she is post-op now so is really now just a Madam.
god4k wrote:
Is it possible to get my webpage url and website url
Yes....
In your web form (the class derived from Page ) you will have access to a property called Request which returns an HttpRequest[^] object. There is a propery on the HttpRequest called Url[^]. This will give you the webpage URL.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I have been working on a client/server application model for a long time and am having a terrible time dealing with file transfer. The main problem is basically having to build and parse the messages myself. I have been looking through a lot of Remoting and other forms of client/server interaction and it seems like some of the ideas here would provide a much more efficient and elegant solution to a client/server program.
What I have been kind of wandering is if there is a simple way to serialize data then send it to the server who in turn just channels it to the appropriate client after doing some basic extraction/parsing. From what I've seen if I could utilize XML and SOAP then the task shouldn't be too difficult, but as I am waiting for some books to arrive on the subjects, I am eager to get started.
Can anyone lead me in the correct direction if I wanted to do the following:
Serialize messages into XML format to send to the server
Server receives the XML message, parses it, then sends it along to the approporiate client
It seems intuitive that if, instead of streaming binary data to send files manually (which is how I am currently having to approach it) I could just serialize a byte array, or in the case of images, serialize a PictureBox, this whole mess could be cleaned up simply.
Any assistance would be appreciated.
|
|
|
|
|
Sounds like you want to build a web service.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah, the premise of the Web Service is exactly what I need, but I haven't been able to figure out if I can use the Web Service to keep track of clients?
|
|
|
|
|
AFAIK, a web server responds to requests, and that's it. What are you trying to do, exactly ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well I am basically working on a simplistic messaging program, which I have completed with success, however I need to have file transfer abilities. So far, all of my attempts have failed due to interleaving of messages of which I cannot seem to prevent. It would seem that there might be a better way of transferring data using XML and perhaps serialization that would alleviate the problems of having to custom build and parse my own messages. The whole idea of the web service is pretty much exactly what I am looking for, except the fact that it only response to clients per request. If there was a way to create a server using the same technology I would definitely like to attempt to do so.
|
|
|
|
|
I'd definately use FTP to transfer files, unless there are firewall issues. Just send your client an FTP address, and it FTP's back for it's file. That's what FTP is for, and converting a file into XML is going to make it bigger.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello Guys,
how are you, hope you are fine?
This is my first time I am doing the ASP.NET C# SO Please please give me a fever in the following codes using C#:
//build id
ID= select MAX(COM_ID) FROM COMPLAINT;
dCmd1 = new suggestionCMD(strSQL1, dbConn);
if (id=0) then {
id +=1;
dCmd2 = insert into COMPLAINT (COM_ID, "COM_TITLE", "COM_DESC", "COM_STATUS","COM_REASON_DESC", COM_USER_ID, COM_DATE, COM_A_ID, COM_Updated_On);
}
dCmd.ExecuteNoneQuery();
IF (strSQL1+=0 || strSQL1 >0){
strSQL1 = strSQL1+1;
}
void InsertCommand(object sender, System.EventArgs e){
suggestionCon CMDConnection;
CMDConnection = new suggestionCon("Server=localhost;
uid=sarah;pwd=sarah;database=suggestion");
suggestionCMD CMD;
CMD = new suggestionCMD("Insert Into COMPLAINT (Title, Description) Values (COM_TITLE, COM_DESC )", CMDConnection);
CMD.Parameters.Add("COM_TITLE", suggestion.Varchar2, 30). Value = InsertTitle.Text;
CMD.Parameters.Add("COM_DESC", suggestionDbType.Varchar2, 100). Value = InsertDescription.Text;
CMDConnection.Open();
CMD.ExecuteNonQuary();
CMDConnection.Close();
LoadData();
}
void PrintButton(){
// Set the page margins
Rectangle rPageMargins = new Rectangle(e.MarginBounds.Location,
e.MarginBounds.Size);
// Generate the offset origins for the printing window
Point[] ptOffsets = GeneratePrintingOffsets(rPageMargins);
// Make sure nothing gets printed in the margins
e.Graphics.SetClip(rPageMargins);
// Draw the rest of the Form using the calculated offsets
Point ptOffset = new Point(-ptOffsets[_iCurrentPageIndex].X,
-ptOffsets[_iCurrentPageIndex].Y);
ptOffset.Offset(rPageMargins.X, rPageMargins.Y);
DrawForm(e.Graphics, ptOffset);
// Determine if there are more pages
e.HasMorePages = (_iCurrentPageIndex < ptOffsets.Length - 1);
_iCurrentPageIndex++;
}
Regards,
Saif
|
|
|
|
|
Firstly, what do you mean by fever?
Secondly, it would be easier for someone to help you if you explain what you're trying to do, and where it's going wrong rather than just posting some problematic code.
|
|
|
|
|
I think he means "do me a favour".
David
|
|
|
|
|
dan neely wrote:
Firstly, what do you mean by fever?
First time I've ever heard someone ask for a disease.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
sorry Judah...this is a spelling mistake where i meant favor which is i need a help nothing else...
thanx and take care
|
|
|
|
|
i meant favor ==> help..
besides that,,
firstl i don't know what meant by following problems:
Compiler Error Message: CS0117: 'ASP.Complaint_Form_aspx' does not contain a definition for 'PrintButton'
Source Error:
<asp:imagebutton id="printBtn" imageurl="../BTN/print.gif" alternatetext="Print" imagealign="top" onclick="PrintButton" runat="server">Line 109: Line 110:
and i have the codes of printing in process codes which is as following:
void PrintButton(){
// Set the page margins
Rectangle rPageMargins = new Rectangle(e.MarginBounds.Location,
e.MarginBounds.Size);
// Generate the offset origins for the printing window
Point[] ptOffsets = GeneratePrintingOffsets(rPageMargins);
// Make sure nothing gets printed in the margins
e.Graphics.SetClip(rPageMargins);
// Draw the rest of the Form using the calculated offsets
Point ptOffset = new Point(-ptOffsets[_iCurrentPageIndex].X,
-ptOffsets[_iCurrentPageIndex].Y);
ptOffset.Offset(rPageMargins.X, rPageMargins.Y);
DrawForm(e.Graphics, ptOffset);
// Determine if there are more pages
e.HasMorePages = (_iCurrentPageIndex < ptOffsets.Length - 1);
_iCurrentPageIndex++;
}
|
|
|
|
|
Saif_S wrote:
'ASP.Complaint_Form_aspx' does not contain a definition for 'PrintButton'
You defined an onclick from memory, and the function to call was called 'PrintButton'. This function needs to be protected or public ( protected is better in general ), and it needs to return void and take two arguments, like this
void PrintButton(object sender, EventArgs ea)
If you have this method in your codebehind ( no where else ), then you won't get this error.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Server Error in '/parts' Application.
________________________________________
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: 'vsSummary"' is not a valid identifier.
Source Error:
Line 120: Line 121:
Line 122: <asp:validationsummary displaymode="BulletList" headertext="The following errors happened:" id="vsSummary"" runat="server">
Line 123: Line 124:
Source File: C:\Inetpub\wwwroot\ALL PARTS\SuggestionSystemProject\Users\Inquiry Category Form.aspx Line: 122
________________________________________
Regards;
please plz plz
|
|
|
|
|
<small><b>Saif_S wrote:</b></small>
<i>'vsSummary</i>
Is this meanto to be in your XML and it isn't ?
Try checking 'Do not treat <'s as HTML tags' so we can see your code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0117: 'ASP.Complaint_Form_aspx' does not contain a definition for 'PrintButton'
Source Error:
Line 106: </tr>
Line 107: <tr align="center">
Line 108: <td height="2" valign="bottom"><asp:ImageButton ID="printBtn" ImageUrl="../BTN/print.gif" AlternateText="Print" ImageAlign="top" OnClick="PrintButton" runat="server"/></td>
Line 109: </tr>
Line 110: <tr align="center">
Source File: C:\Inetpub\wwwroot\ALL PARTS\SuggestionSystemProject\Users\Complaint Form.aspx Line: 108
Server Error in '/parts' Application.
________________________________________
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0116: A namespace does not directly contain members such as fields or methods
Source Error:
Line 23:
Line 24: //build id
Line 25: ID= select MAX(COM_ID) FROM COMPLAINT;
Line 26: dCmd1 = new suggestionCMD(strSQL1, dbConn);
Line 27: if (id=0) then {
Source File: C:\Inetpub\wwwroot\ALL PARTS\SuggestionSystemProject\Users\Complaint Process.aspx Line: 25
Server Error in '/parts' Application.
________________________________________
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 117: <tr bordercolor="0">
Line 118: <th height="24" bgcolor="#A3D1A3"> <div align="left"><font color="#003366" face="Vrinda">Description:</font></div></th>
Line 119: <td><asp:textbox ID="description" TextMode="MultiLine" Wrap="true" columns="30" rows="3" maxlength= "100" AutoPostBack="false"runat="server"/>
Line 120: <asp:requiredfieldvalidator ID="vldDes" runat="server"
Line 121: ControlToValidate = " txtDesc " Display="Dynamic" ErrorMessage = "You must enter Description." Text="*" />
Source File: C:\Inetpub\wwwroot\ALL PARTS\SuggestionSystemProject\Users\Inquiry Form.aspx Line: 119
Server Error in '/parts' Application.
________________________________________
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The 'Newspace' attribute is not supported by the 'Import' directive.
Source Error:
Line 2: <%@ Import Namespace="System" %>
Line 3: <%@ Import Namespace="System.Data" %>
Line 4: <%@ Import Newspace="System.Data.SqlClient" %>
Line 5: <script runat=server>
Line 6: session["login"]=username
Source File: C:\Inetpub\wwwroot\ALL PARTS\SuggestionSystemProject\Users\Inquiry Process.aspx Line: 4
Regards;
please please give me a fever...
|
|
|
|
|
what do you need a fever for and what kind of fever do you need?
|
|
|
|
|
Saif_S wrote:
Compiler Error Message: CS0117: 'ASP.Complaint_Form_aspx' does not contain a definition for 'PrintButton'
You need to add the PrintButton method for your onclick
Saif_S wrote:
CS0116: A namespace does not directly contain members such as fields or methods
I think this means there's a mismatch ( maybe just upper/lower case ) in your class name and the name in your ASPX header ?
Saif_S wrote:
Parser Error Message: The server tag is not well formed.
You've forgotten to put a closing tag on something.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanx for replying..
but i meant that i need help from you...
so the problems that i had, firstly with the build id:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0116: A namespace does not directly contain members such as fields or methods
Line 23:
Line 24: //build id
Line 25: ID= select MAX(COM_ID) FROM COMPLAINT;
Line 26: dCmd1 = new suggestionCMD(strSQL1, dbConn);
Line 27: if (id=0) then {
the second problem is Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0117: 'ASP.Complaint_Form_aspx' does not contain a definition for 'PrintButton'
Source Error:
Line 106: </tr>
Line 107: <tr align="center">
Line 108: <td height="2" valign="bottom"><asp:ImageButton ID="printBtn" ImageUrl="../BTN/print.gif" AlternateText="Print" ImageAlign="top" OnClick="PrintButton" runat="server"/></td>
Line 109: </tr>
Line 110: <tr align="center">
Note:
I have two ASPX pages, one is a form and other is a process page..how can i can connect them together.
the third problem i had is
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: 'vsSummary"' is not a valid identifier.
Source Error:
Line 120: <th height="24" colspan="2">
Line 121: <span class="style15">
Line 122: <asp:ValidationSummary DisplayMode="BulletList" HeaderText="The following errors happened:" ID=vsSummary" runat="server" />
Line 123: </span> </tr>
Line 124: </table>
the forth problem is
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The 'Newspace' attribute is not supported by the 'Import' directive.
Source Error:
Line 2: <%@ Import Namespace="System" %>
Line 3: <%@ Import Namespace="System.Data" %>
Line 4: <%@ Import Newspace="System.Data.SqlClient" %>
Line 5: <script runat=server>
Line 6: session["login"]=username
|
|
|
|