|
Hi,
I want you to help me in deploying a asp.net 2.0 web application which makes use of sql database.
Generally, the process that i follow is:
I will generate a sql script of my databse, export the data into excell file.
And, i will copy my project and create a virtual directory in the server.
Then i will run the sql script in the sql query analyser of server and import the excell data sheet.
This holds good for within the LAN.
But, now my requirement is i want to pack database and my project into a single exe file. So, that when the client installs in his server, the databse connects automatically and the project works fine...
Please help me...Its urjent.
|
|
|
|
|
You can create the scripts for the database structure as well as forthe data
In your app detect when it is the firs time use and ask the user to choose the server user and password, using that, connect to the server and execute the scripts, also save the server, user and password in webconfig for later use by your app
Alexei Rodriguez
|
|
|
|
|
Can you be more clear.?
I mean how to attach the created database scripts to web setup project.?
|
|
|
|
|
I am new a themes and skins so please bare with me. What I have is a gridview that rows contain textboxes and dropdowns in the row's columns. What I need to do is design a skin for the gridview that allows the entire row, controls and all, to appear yellow (background) once the row is selected. I have a default skin for the gridview and plan to modify this to meet my needs. Can anyone provide recommendations as to the best way to do this?
Thanks,
Steve
|
|
|
|
|
Use the designer to create a gridview with all yor requirements (Color for rows, selectedrow, edit row, etc)
Then copy all the sourcecode generated and insert it in a skin file inside a theme
You shoull only leave the properties that have to do with design, remove the is property and you can add a skinid property in the skinfile for the gridview
Example
<asp:GridView runat="server" CellPadding="2" ForeColor="#333333" GridLines="Horizontal" >
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" />
<PagerStyle CssClass="gridPager" BackColor="#FFCC66" ForeColor="#333333" />
<HeaderStyle CssClass="gridHeader" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
Alexei Rodriguez
|
|
|
|
|
Thanks for the help; however, let me explain my problem a bit more in detail. I do have a skin file with a skin for my gridview that works. The problem is that each of the gridview's row cells contains textboxes for data IO. Now, what I want to do is change the background color for the gridview row and that row's textboxes (showing selection) when the cursor enters one of the row's textboxes. If this sounds confusing it probably is and if more information on what I am doing is needed just let me know.
|
|
|
|
|
Convert your columns to templatecolumns
Set the necesary properties for each textboxes edit mode
Alexei Rodriguez
|
|
|
|
|
Ive never tryed this
If you are using css, try with something like this for the selectedrow or editrow:
#row
{
settings for the row
}
#row input
{
settings for input tags inside the row
}
Alexei Rodriguez
|
|
|
|
|
I have now studied themes and feel that my origional question was not accurate. What I have is a GridView with each row made up of cells containing textboxes. All I need to do is change the background of the grid's row and its textboxes once it has been selected. I do have a skin for both a non selected background and a selected background and see that I can set the SkinID property to either. All I want to do is have the background of the gridview's row and textboxes indicated that it has been selected. Can anyone provide advise?
Thanks,
Steve
|
|
|
|
|
You dont need to skins for that
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" ForeColor="Navy" />
This accomplishes what you need
Alexei Rodriguez
|
|
|
|
|
First off, thank you very much for your help. If you want me to mark this as answered as correct for you I will and post a new question, just tell me. The problem I need to solve, I think, is with textboxes that make up the cells of the grid. When I select one of the textboxes that make up the cells of the gridview, then I want the whole row, each of the row's textboxes, to be highlighted in yellow. Sorry, for my poor wording of the initial question.
Thanks again,
Steve
|
|
|
|
|
Hello,
I've developed a hosted application who's timezone is different from where data entry takes place. All historic datetime entries has been entered with a time of 00:00:00. I'm uploading data as XML and using readxml and then converting into sql 2005. The problem is readxml process subtracts 3 hours from the time and therefore pushes the date back 1 day. Since this is a batch command, how can I avoid this? I've read old posts indicating that I would have to add an offset to the time before executing the readxml. This seems like a short coming. Would eliminating thr schema help with this problem? Using VS2008 ASP 3.5, and hosted SQL 2005.
Thanks
|
|
|
|
|
Does anyone have a link for a good Themes and Skins tutorial?
Thanks,
Steve
|
|
|
|
|
Have you tried http://asp.net, they have lots of tutorials in the form of code and videos?
|
|
|
|
|
I have a web page that has a link for an attachment and that uses Javascript to popup a new window, and that new window has code in the code behind to allow the user to open/save an attachment. (It works this way because we have 3rd party software that stores all of our documents for this application).
Link (from the source):
<a href='javascript:RetrieveDocument(-9999998998)'>AnnouncementAttachment.txt</a>
Javascript:
var download_win;
function RetrieveDocument(id)
{
CloseDownload();
download_win = window.open('../Common/DocRetrieval.aspx?id=' + id,'attachment','width=1, height=1, top=0, left=0, toolbar=0, menubar=0, location=0, status=0, scrollbars=0, resizable=1');
window.onunload=CloseDownload;
}
function CloseDownload()
{
if(download_win != null)
{
download_win.close();
}
}
Code behind in DocRetrieval.aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
string doc_id = Request.QueryString["id"];
//This part retrieves the document from the database
DataObjects.Document docs = new DataObjects.Document();
docs.EnforceConstraints = false;
DataObjects.Document.DocumentRow doc = docs._Document.NewDocumentRow();
doc.doc_id = long.Parse(doc_id);
docs._Document.AddDocumentRow(doc);
DataRequestChain.RequestBase req = DataRequestChain.RequestFactory.CreateRequest("GetDocument");
req.DataObject = docs;
req.ExecuteTran(); //the actual call to the db
if (!doc.Isdoc_nameNull())
{
Response.Clear();
Response.Buffer = true;
Response.AddHeader("Content-Disposition", "attachment; filename=" + doc.doc_name );
Response.AddHeader("Content-Length", doc.file.Length.ToString());
Response.ContentType = doc.content_type;
Response.BinaryWrite(doc.file);
Response.End();
}
}
Watin code in my test class:
ie = this._cpUi.CreditPlusIeWindow; //(already set up)
this._cpUi.Detail.Frame.Link(Find.ByText(FILE_NAME)).Click(); //This is the link for the attachment
cpUi.CatchPopupIEWithoutBaseUrl(docRetrievalURL, false); //This catches DocRetrieval.aspx and puts a pointer to it in cpUi
Assert.That(cpUi.CreditPlusIeWindow.Url.ToUpper().Contains(docRetrievalURL.ToUpper())); //Make sure we have our DocRetrieval page
//Handle the open/save file dialog
FileDownloadHandler dialogHandler = new FileDownloadHandler(FileDownloadOption.Open);
ie = cpUi.CreditPlusIeWindow;
WatiN.Core.DialogHandlers.FileDownloadHandler baseDialog = new WatiN.Core.DialogHandlers.FileDownloadHandler(FileDownloadOption.Open);
ie.DialogWatcher.Add(dialogHandler);
baseDialog.WaitUntilFileDownloadDialogIsHandled(15);
The WaitUntilFileDownloadDialogIsHandled doesn't do anything, it waits for 15 seconds and then throws an exception that it's not handled. The dialog that pops up immediately goes away, I'm not sure why, I would think the baseDialog was clicking the "ok" but that is not apparent in the few seconds that dialog is up, and a file will never open. I'm not sure how to use Watin to handle this. The whole point of the test is to make sure the attachment was stored correctly. I.e. we are able to open it from the original web page. Any help would be appreciated!! Thanks!
|
|
|
|
|
In my webform I have a search functionality with name or email. This options has been given using a radio button. A textbox is also provided for entering the name or email. Since this is a required field, a required field validator is given.
Also I need to validate the email, only if the user selects email radiobutton and enter the email id. I have the email validation expression which is working perfectly fine.
My problem is if he selects name and enters something in the textbox, then there is no need to trigger the email validation. So how can I do all this validations with a single text box.
Since the user needs to select either name or email, I want to have only one text box. Can anybody please provide any solution for this? Thanks for any help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Use a custom validator
Youll have to implement your logic with javascript to make it more user friendly
Alexei Rodriguez
|
|
|
|
|
hi everyone,
im a asp.net newibe and i have a question regarding a method of work.
my issue is as follow:
in my form i got some control that can be drag by a client.
the amount of controls is dynamic.
in the server i got an array that holds each control coordinates.
I captured the drag event in the client and i can keep the new coordinates in the client-side.
the problem is how do i update the coordinates array in the server without a postback????
saving them in a hidden parameter is a good idea in case you have a known amount of controls but if the number is unknown i need to create a hidden parameter for each control.
do you have any idea for an algorithm that could help me
|
|
|
|
|
shovaly wrote: the problem is how do i update the coordinates array in the server without a postback????
Of course you can't do anything on the server without communicating with the server. If you mean without posting the entire form then you are asking about using some form of Ajax or Remote Scripting. You can Google both of those things and find tons of information.
led mike
|
|
|
|
|
OK thanks,
but finally i used cookies in order to save the contorol coordinates
|
|
|
|
|
Is there a way to make a button that will make a specific pane show in an accordion?
Example:
I have 5 panes. In each one I would like a button that says Next. You click it and it automatically expands/goes to the next pane.
|
|
|
|
|
|
Are you saying use DIV instead of an accordion?
|
|
|
|
|
|
Ok.. so I guess you cant do the accordion thing? I was wanting to do that..
|
|
|
|