|
iam installing
MICROSOFT VISUAL STUDIO 2005 STANDARD AND ACADEMIC EDITIONS
plz let me know the product key
help would be much appreciated
|
|
|
|
|
Sure - it's BUY_IT_DON'T_PIRATE_IT
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi,
I am using a simple popup application in which I popup a window and the window will write the value into the parent window text box.
child.aspx
function Fillvalue()
{
var txtDefault = document.getElementById('txtChild');
window.opener.document.form1.txtDefault.value = txtDefault.value;
window.close();
}
default.aspx
function OpenPopup(parentID)
{
var winHeight = 600;
var winWidth = 830;
var url = 'frmChild.aspx?';
options = 'menubar=0,resizable=1,status=0,scrollbars=1,height=' + winHeight + ',width= ' + winWidth +
',left=' + ((screen.width-winWidth)/2) + ',top=' + ((screen.height-winHeight)/2);
window.open( url, '', options );
}
This is working fine and returning me the desired value. which I entered in the child(popup) window.
but, when I am using
window.opener.document.form1.txtDefault.value = txtDefault.value;
in my other application the above is not working. I am very much confussed, what might be wrong, any solution please....
Ram
|
|
|
|
|
How we can retrive the data from a table using asp.net 2.0
|
|
|
|
|
The code sample above retrieves an entire record from a database table. Sometimes however we need only specific fields from a row in a database table. In this case we need to supply the stored procedure with not only an input parameter as in the previous section, but also one or more output parameters to store the result of the stored procedure.
The following is an example of a stored procedure which will take as input the CustomerID value and return only two fields: CompanyName and ContactName. For this limited result set, we have to use the AddOutputParameter() method. This method is used to return the output of a stored procedure.
It is recommended when executing a stored procedure with output parameters to use the ExecuteNonQuery() method instead of the ExecuteDataReader() method.
The SQL stored procedure is as follows:
CREATE PROCEDURE [dbo].[GetCustomerMultipleFields]<br />
(<br />
@CustomerID NCHAR(5),<br />
@CompanyName NVARCHAR(40) OUTPUT,<br />
@ContactName NVARCHAR(30) OUTPUT<br />
) <br />
AS<br />
SET NOCOUNT ON<br />
SELECT<br />
@CompanyName = [CompanyName],<br />
@ContactName = [ContactName]<br />
FROM<br />
[Customers]<br />
WHERE<br />
[CustomerID] LIKE @CustomerID<br />
GO<br />
The following C# code executes the above stored procedure and uses the AddOutputParameter() method to obtain the results:
<br />
try<br />
{<br />
Database db = DatabaseFactory.CreateDatabase();<br />
DBCommandWrapper dbCommandWrapper = db.GetStoredProcCommandWrapper("GetCustomerMultipleFields");<br />
dbCommandWrapper.AddInParameter("@CustomerID", DbType.String, "ALFKI");<br />
dbCommandWrapper.AddOutParameter("@CompanyName", DbType.String, 40);<br />
dbCommandWrapper.AddOutParameter("@ContactName", DbType.String, 30);<br />
db.ExecuteNonQuery(dbCommandWrapper);<br />
string results = string.Format("Company Name : {0}, Contact Name {1},",<br />
dbCommandWrapper.GetParameterValue("@CompanyName"),<br />
dbCommandWrapper.GetParameterValue("@ContactName"));<br />
Response.Write(results);<br />
}<br />
catch (Exception ex)<br />
{<br />
Response.Write(ex.ToString());<br />
}<br />
In the above code, I passed a customer ID value to the stored procedure as an input parameter. As the stored procedure is designed to return two values, CompanyName and ContactName, these were identified as output parameters.
To display the returned values we used another method of dbCommandWrapper, which is GetParameterValue(“ParameterName”). This method returns the value of the parameter specified.
With Regards
Satips
|
|
|
|
|
Kindly tell me some other way without using procedure
|
|
|
|
|
Using the Stored Procedure and query is the best method for retreiving the Data's from the table.
With Regards
Satips
|
|
|
|
|
Hi there,
+ Pls Be Specific on your Question. Dont ask a question like (General) this.
+ Can you figure out, where u r getting problem on Retrieving Data from DataBase ?
+ You need to use SQLDataSource or ObjectDataSource or some one else to achieve this.
Regards,
Jay
|
|
|
|
|
Hi,
what's the difference between Server.Transfer and Response.Redirect
|
|
|
|
|
Redirect and Transfer both cause a new page to be processed. But the interaction between the client (web browser) and server (ASP.NET) is different in each situation.
Redirect: A redirect is just a suggestion – it’s like saying to the client “Hey, you might want to look at this”. All you tell the client is the new URL to look at, and if they comply, they do a second request for the new URL.
If you want to pass state from the source page to the new page, you have to pass it either on the URL (such as a database key, or message string), or you can store it in the Session object (caveat: there may be more than one browser window, and they’ll all use the same session object).
Transfer: A transfer happens without the client knowing – it’s the equivalent of a client requesting one page, but being given another. As far as the client knows, they are still visiting the original URL.
Sharing state between pages is much easier using Server.Transfer – you can put values into the Context.Items dictionary, which is similar to Session and Application, except that it lasts only for the current request. (search for HttpContext in MSDN). The page receiving postback can process data, store values in the Context, and then Transfer to a page that uses the values.
With Regards
Satips
|
|
|
|
|
Hi,
Have a look at Server.Transfer vs Response.Redirect[^] for your clarification.
In Brief:
Response.Redirect simply tells the browser to visit another page. Server.Transfer helps reduce server requests, keeps the URL the same and allows you to transfer the query string and form variables.
Regards,
Jay
|
|
|
|
|
Dear All,
I'm a beginner in ASP.Net and was building a asp.net application. Just wanna to ask is there any commands or functions in asp.net which can act similiarly like Application.DoEvents in windows programming? Please help. Thanks!
|
|
|
|
|
You can use client scripts i.e., java script to execute the applications by using var wshShell = new ActiveXObject("WScript.Shell"); object.
Sathik
|
|
|
|
|
Actually my web application is link to a scanner where tags/bar code goes over the scanner, the tag number will be display in a listbox. There are a DO loop in the program checking whether any tags had been scanned. If yes, the program will display the tag in a listbox. Else the program will continue to loop till the user press stop scan.
At first i thought in web application, there is functions such as Application.DoEvents which will process the event once it detect user input. Any idea on how to display tag numbers which were scanned and display it in the list box on shot without refresh the page? Please help. Thanks alot.
|
|
|
|
|
You can use a client control or server control with client script to achieve this by using AJAX
Sathik
|
|
|
|
|
Dear Sathik,
Thanks for your reply. I try using AJAX in my application but i face another problem. Is it anyway for me to execute some functions under the button.click event before calling the client script functions using Ajax? Thansk in advance.
|
|
|
|
|
How would I delete a file from the server? I haven't been able to find any code that demonstrates this...
AHA! File.Delete
|
|
|
|
|
Give this a shot:
System.IO.File.Delete(Server.MapPath("filetodelete.ext"));
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
try this
using System.IO;
path = Server.MapPath("../Client").ToString();
File.Delete(path);
|
|
|
|
|
I have master page with several panels and depending on the user configuration I load the childpages on different panels, in other words I move around the ContentPlaceHolder, now, since I started doing that some server controls started to behave strangely, for example a gridview which was working fine now when a row is selected it will say:
============================================================
SelectedDataKey null System.Web.UI.WebControls.DataKey
SelectedIndex 4 int
SelectedRow {System.Web.UI.WebControls.GridViewRow} ...
SelectedRowStyle {System.Web.UI.WebControls.TableItemStyle} ...
SelectedValue null object
============================================================
the SelectedDataKey and SelectedValue are null while SelectedRow is fine.
What happens when I add the ContentPlaceHolder to another panel that is not the original panel that contained it that makes this viewstate issue happen?
I switch the ContentPlaceHolder from panel to panel like this:
=========
PanelX.Controls.Add(mainplaceholder);
or
PanelY.Controls.Add(mainplaceholder);
=========
I'm doing this on "protected override void OnInit(EventArgs e)" of my "main.default.cs".
any help is very much appreciated!
|
|
|
|
|
ThePlagueIsBack wrote: What happens when I add the ContentPlaceHolder to another panel that is not the original panel that contained it that makes this viewstate issue happen?
Hi there. I'm sure that is in fact where a viewState issue would come in. The Panel is an INamingContainer, and child controls within a Panel would be rendered with client ID's that reflect the parent naming container.
I'm not sure I have any advice for you on what to do.
|
|
|
|
|
that makes sense however! I executed the page with the contentplaceholder on the default place and compared the html source with different panel positions and the placeholder has always the same id, every other property is identical.
|
|
|
|
|
I want to add a cancellation-confirm message to the cancel button a wizard control. I'd normally do something this if I could access the button control:
btnMyButton.Attributes.Add("onClick", "javascript:return confirm('Are you sure you want to delete the Internet?')")
Any ideas on how I can access the cancel button in the wizard control to do this? Thanks
|
|
|
|
|
Right click the Wizard component -> "Edit Template" -> "Finish Navigation Template" and create your own button set or whatever you want to put there.
sample template:
<FinishNavigationTemplate>
<asp:Panel BackColor="#E0E0E0" Width="300" Style="padding:3px" Runat="Server">
<asp:Button id="FinishPreviousButton" CommandName="MovePrevious" Text="Prev" Width="60" Runat="Server"/>
<asp:Button id="FinishButton" CommandName="MoveFinish" Text="Finish" Width="60" Runat="Server"/>
</asp:Panel>
</FinishNavigationTemplate>
|
|
|
|
|