|
Hai
Iam new to web applications. In my application try to add rows to gridview and save the row data in to sql server db.
My problems
-----------
1. While adding rows only one row is added. Trying to add another row firstly created row is removed and adds a new row. Cant add rows continuesly.
2. Only one SAVE button is there. While saving newly created ROW data cant inserted to db.
Pls help to find a solution.
Regards,
KP
|
|
|
|
|
The solution is to fix your code. It sounds like you're not saving your new rows, so they are lost. Why are you taking on something this complex when you're new to web apps ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
This is not a question, its just something that happened to me, and since it is related to web apps, im posting it here
A few days ago, i uploaded my app to the hosting server, i uploaded everything to a temp folder (PortalTemp) and i tought that then i would only rename the main folder (Portal) to Portal2 and PortalTemp to Portal, this way, the new version would be live, as you can imagine, it should take no more than a minute...
For my surprise, it took me almost a week!!!
Well...something went wrong a the server (Shared server where i dont have direct access and i only access it over FTP)
Suddenly, i wasnt able to rename PortalTemp to Portal (i had already changed Portal to Portal2)
So there i was, with the new version in PortalTemp
I contacted godaddys support to tell them about the problem, and man, they are really slow
They take almost a day to answer
They dont have any idea of what they are doing
They even have to reccur to "Experts" in order to rename a folder, oh man, they just make me laugh
And this is the secont time that this happens to me
Im glad i dodnt call them, because im in mexico and it would have been really expensive to spend maybe a whole day on th phone talking to "Experts"
Here is the whole story:
ME
I dont know if ill have to spend another week just to rename a fuc#$% folder or what
It is always the same problem with your ftp applet
I cant rename a folder
I have this 2 folders on my root folder:
-Portal
-PortalTemp
Just change their names
Change Portal to PortalTemp
Change PortalTemp to Portal
And i dont want any excuses like the one below (Which just makes me laught, because it tells me that some people is really incompetent):
"Due to its complex nature, your issue has been relayed to our Advanced Technical Support Team. Our most skilled technicians will be working to resolve your issue quickly and completely. You will be notified promptly upon resolution."
------------------------------------
GODADDY
Dear sir/madam,
Thank you for contacting online support.
We can rename your folders on your account however, in order to do so we will need you to provide us with the last 6 digits of the payment method on the account before our Hosting Admins can enter your account and rename the folders. You can also rename the folders using the File Manager on the account.
1. Log in to your Account Manager.
2. In the My Products section, select Hosting.
3. Next to the hosting account you want to modify, click Manage Account.
4. In the Content section, click File Manager.
Please let us know if we may be of further assistance.
Regards,
Gordy P.
Online Support Technician
--------------------------------
ME:
Thanks for your reply
Last 6 digits: xxxxxx
I have this 2 folders on my root folder:
-Portal
-PortalTemp
Just change their names
-Change Portal to PortalTemp
-Change PortalTemp to Portal
I dont know whats going on on your server, but i cant be waisting time just to rename folders or delete folders as the last time
File Manager doesnt work
Your FTP Applet doesnt work
My FTP Client doesnt work
You have a problem with in your server
I had heard that you had a horrible service, now i can say so too
Las time i spent almost a week just to delete a folder
------------------------------
GODADDY:
Due to its complex nature, your issue has been relayed to our Advanced Technical Support Team. Our most skilled technicians will be working to resolve your issue quickly and completely. You will be notified promptly upon resolution.
This is your Incident ID: 5060369
Thanks,
GoDaddy.com, Inc.
-----------------------------
GODADDY:
Dear Sir/Madam,
Thank you for contacting Hosting Support. After looking into your account, I have found that you have both sub-directories setup as IIS Virtual Directories. While these folders are set as Virtual Directories, you will not be able to rename or modify them. You will need to remove the permissions that you have set in the IIS Settings menu if you would like to change the folder names or delete them.
Please contact us if you have any further issues.
Regards,
Dave N.
Hosting Support
------------------------------
ME:
Im not sure if you know what you are doing, it doesnt look like you do
IIS virtual directories have nothing to do
I just removed the 2 virtual directories in iis and tryed to rename the folders
For Portal - I could rename this folder to Portal2 or any other name, but i changed it back because i couldnt rename PortalTemp
For PortalTemp - I could NOT rename this folder to any other name
Then i readded the 2 IIS folders and tryed to rename the folders, and i had the same results as when there were no virtual directories in iis (I could rename Portal to anything else)
So...IIS virtual directories have nothing to do
PortalTempis the onw locked, i tryed to rename it with your File Maneger and i received the Error: Rename failed
JUST RENAME THE FOLDERS AND I DONT WANT ANY MORE EXCUSES
-----------------------------------------
GODADDY:
Due to its complex nature, your issue has been relayed to our Advanced Technical Support Team. Our most skilled technicians will be working to resolve your issue quickly and completely. You will be notified promptly upon resolution.
This is your Incident ID: 5060369
Thanks,
GoDaddy.com, Inc.
--------------------------------------
GODADDY:
Dear Sir/Madam,
Thank you for contacting Hosting Support.
We apologize for the inconvenience. Upon review of this issue it appears there was a permission issue with the PortalTemp directory. We have corrected this error and ensured that the directory names are able to be modified.
We have not taken action in renaming these directory on your behalf. We ask that this modification be completed by you. As such we suggest using either a third-party FTP client or our File Manger to accomplish this task. We appreciate you understanding.
Please contact us if you have any further issues.
Regards,
Nick D,
Hosting Support
-----------------------------
ME:
Thanks for fixing the problem, now o could rename the folders
So...this time it was a permission?
Las time it was a session that didnt close correctly
Eithe one are a real problem that you guys need to fix
Ill need to rename the folers in 2 or 3 weeks
Should i get a ticket now?? This way it will be almost ready in 2 weeks when i need it, and ill be able to "easily rename the folders"
What do you think??
Should i wait until i get the problem and waste 1 week waiting for you to resolve the problem?? or
Should i tell you about my future problem and have it ready by the time i need it??
--------------------------
GODADDY:
Due to its complex nature, your issue has been relayed to our Advanced Technical Support Team. Our most skilled technicians will be working to resolve your issue quickly and completely. You will be notified promptly upon resolution.
This is your Incident ID: 5060369
Thanks,
GoDaddy.com, Inc.
--------------------------------
GODADDY:
Dear Sir/Madam,
Thank you for contacting Hosting Support.
Upon reviewing this issue it does not appear as though further assistance is required. Please let us know if you have any further questions, comments, or concerns by replying to this email. Our service departments and telephone lines are open 24 hours a day, 365 days a year to accommodate your needs anytime.
You can also reach us by phone at the following numbers:
(480) 505-8877 Technical Support, Sales and Service
(480) 505-8855 Billing
Please let us know if you have any other questions.
Thank you,
Moe F.
Hosting Support
------------------------------
Alexei Rodriguez
|
|
|
|
|
Hello guys.
I m created Treeview & Menu in ASP.net using vb lang. now i m try to write code for treeview for expend and Collapse. But it is showing Error
And one more thing I m not yet assigned link.
I m receiving following error:
Server Error in '/web page1' Application.
--------------------------------------------------------------------------------
Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +261
System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +83
System.Web.UI.WebControls.TreeView.RaisePostBackEvent(String eventArgument) +119
System.Web.UI.WebControls.TreeView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
|
|
|
|
|
I am new to web programming but have extensive experience with desktop apps. I have a question about asp.net. If I have two radio buttons called yes and no. If user checks no then I want a dropdownlist to become visible else invisible.
Now the questions I have are:
1. I created an event handler for the radio buttons which make the list visible and invisible. But if the AutoPostBack property is set to false then the event handler will only be invoked when a postback occurs (even by some other control), correct?
2. How can I make the list invisible and visible if postback is false? See if the AutoPostBack property of the radio button is false then its event handler is not fired upon check change. I want to make the list visible right away when the check changes.
3. What should I be aware of if AutoPostBack property is set to true? Any disadvantages or advantages?
|
|
|
|
|
1 - correct.
2 - the way you should do this is by using javascript, no need to do a postback just to make a control visible.
3 - a page that posts back all the time is a PITA, especially when people are used to AJAX.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Wrap the dropdown in a div tag, add a javascript function in the head of your page to alter the visibility of this div, and call it via onclick attributes added to your radio buttons in code-behind:
HTML:
<asp:RadioButton id="radYes" Runat="server" Text="Yes" GroupName="radYN"></asp:RadioButton>
<asp:RadioButton id="radNo" Runat="server" Text="No" GroupName="radYN"></asp:RadioButton>
<div id="divDD" style="display:none;"> <!-- delete this style if default is visible -->
<asp:Dropdownlist runat="server" id="ddlNo">
</asp:DropdownList>
</div>
JavaScript:
function toggle() {
if (document.getElementById("radYes").checked) {
document.getElementById("divDD").style.display = 'none';
} else {
document.getElementById("divDD").style.display = 'inline';
}
Code-behind:
radYes.Attributes.Add("onclick", "toggle()")
radNo.Attributes.Add("onclick", "toggle()")
And all achieved without postback - which should be avoided wherever possible as it (obviously enough) increases bandwidth as well as the load on the server.
|
|
|
|
|
why not just add the onclick inline ? Will ASP.NET wipe it for it's own ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
well.. it's just the "proper" way to do it in Visual Studio!! VS will underline it in red and tell you it's not a valid property - which it isn't of the server control; it's only when the page renders it as an html control that it becomes so.
|
|
|
|
|
Fair enough. I'd tend to do it inline because I'd regard it as cleaner, and not be dictated to by the IDE. but, your way works, no doubt.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Phil,
Where in the code behind should I add the attribute to the collection? Page_Init()?
|
|
|
|
|
I have a DataSet with two tables with a relationship.
dataSetNodeData.Relations.Add(new DataRelation("Relationship",
dataTableTransmittal.Columns["Node ID"],
dataTableDocuments.Columns["Parent"]));
This is working, but now the customer have changed the indata so Parent is now a commaseparated string with id numbers so the same document can belong to several Node ID's.
Can I make the DataRelation work with a commaseparated string? Or do I have to rewrite my application totaly?
|
|
|
|
|
No, that's not going to work. You need to rethink your architecture. I suspect you need to change your dataTableDocuments to have a record per parent id, even if they are stored as a csv. I'd say don't store them that way in the first place, just add records for each parent relationship.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes, that's the way I thought that I hade to go.
I can't affect the indata as it is a export (xml) from a CMS system.
|
|
|
|
|
I have 5 radiobuttons. When i select one, it should be made bold. Other radiobuttons should be displayed with normal font. How to achieve this?
|
|
|
|
|
javascript. Handle the event and then use JS to bold the text. The text is in a label, it's actually not part of the radio button in HTML, so there's some hoops you'll need to jump through.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
here is my code :
row["ReductionDetails"] = row["ReductionDetails"] + "" + Value
+ "% of " + GetProductNameById(ProductId) + '\n';
what i want to get :
< td >
MY FIRST LINE
MY SECOND LINE
< /td >
there is no result with : '\n' and what i got : MY FIRST LINEMY SECOND LINE
i tried the "< br / >" and what i got : MY FIRST LINE < br / >MY SECOND LINE
|
|
|
|
|
\n is a waste of time in a website. If the br tag is shown then it's being escaped.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How I can upload doc files in ASP.Net and later retieve it using Gridview control.please specify complete code along with necessary table to be built in SQL Server 2005 Express Edition
|
|
|
|
|
shreesh_9 wrote: please specify complete code along with necessary table to be built in SQL Server 2005 Express Edition
Dream on, buddy, we're not here to do your work for you.
If you don't want to display the contents of the doc file, it's pretty trivial. You use an upload control, which is the only way to upload a file, then you store it as a blob with an id in the database. Then you make your download URL pass the id, get the blob from the DB and send it to the user.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi, I am getting the following error by reading the data from CSV file to dataset.
"'C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides"
string _filepath = @"C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv";
string _fileexten = Path.GetExtension(_filepath);
string strConn = "";
if (_fileexten == ".csv")
{
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _filepath + ";Extended Properties='text;HDR=Yes';";
}
OleDbConnection oledbconn = new OleDbConnection(strConn);
oledbconn.Close();
oledbconn.Open();
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", oledbconn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
dt = myDataSet.Tables[0];
oledbconn.Close();
myCommand.Dispose();
G. Satish
|
|
|
|
|
Satish - Developer wrote:
"'C:\Documents and Settings\satish.gorijala\Desktop\csvData.csv' is not a valid path
This is just a guess, and don't quote me or anything, but at a push i'd hazard a guess that it could possibly be that the path specified does not exist.
Once again, just a guess and all.
|
|
|
|
|
i show my files in gridview, and i have a column that is checkbox and i can select multiple file. i want with select multiple checkbox i can send multiple file to print. can i do this? can anybody help me? plz
|
|
|
|
|
The only thing a web app can do, is print the full browser window. So you need to open a print view for any document you want to print. Of course, the browser has to be able to display it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all,
Any one suggest me how to edit my url and submit the page on button click with out using Response.redirect.
for eg:
www.mysite.com/default.aspx
this is my page, on button click the page should submit and reload, the url should look like www.mysite.com/default.aspx?step=1 (no response.redirect, because i am losing the viewstate even though i set the EnableViewState="true")
Thank you
Know is Drop, Unknown is Ocean
|
|
|
|
|