|
I would double check the @iniplace parameter.
|
|
|
|
|
Try using the following also:
insert.Parameters.Add("@iniplace", SqlDbType.VarChar);
insert.Parameters("@iniplace").Value = txtiniplace.Text.ToString();
|
|
|
|
|
yes, it is obvious that your collection insert.Parameters does not contain '@iniplace' parameter.
Check place in your code where you create this collection and check if you create '@iniplace' parameter with right name and you don't have a typo in there (or maybe you miss it at all).
Pilo
|
|
|
|
|
But i have checked in my stored procedure even,nothing wronge there,in the asp page also i have insert command same as the others.
|
|
|
|
|
Problem is not in sql query (or stored procedure), problem is probably in SqlParameterCollection insert.Parameters, which you pass to your insert command.
Exception is raised when you try to assign a value to a insert.Parameters["@iniplace"].Value property.
Exception says that there is no "@iniplace" parameter.
You should check a place in your code, where you create insert.Parameters collection and check if you create parameter "@iniplace" correctly.
If you can paste a code, which creates this collection, maybe I can tell you what is wrong.
Pilo
|
|
|
|
|
i have used following code to set timer interval
timer = new Timer();
timer.AutoReset = true;
timer.Interval =
60000 * Convert.ToDouble(ConfigurationSettings.AppSettings"IntervalMinutes"]);
timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
but i want to change timer interval per day , per month
how to do it
please suggest
awaiting for answer
Mahendra
|
|
|
|
|
well first of all a timer can only be as big as an intmillioseconds
So have it set to 30000 or 60000 which is 30 secnds or 60 seconds respectively
and then check your days
Nick
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
like I said have a short interval then test the current time by that. If its 15 days then record the date somewhere then do a compare at each short interval
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
an int cannot go that high.
you must set it to one minute and then do a date compare. Theres no way around it
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Is possible use these controls as "stand-alone", without none membership providers???
Regards
Jesus is Love! Tell to someone!
|
|
|
|
|
Yes, it is. You can use the event of the control that occurs before the membership provider is called, for example the LoggingIn event of the Login control, the ChangingPassword of the ChangePassword control. In the handler, you can provide your custom logic, and remember to cancel the event to avoid calling the provider. In addition, the control may provide a custom event to allow to use your logic such as the Login control with the Authenticate event. Also, if you don't use the provider, you may also consider using your own control.
|
|
|
|
|
Recently we have had some productional issues regarding this command line utility. We ran it and deployed new code which should not have deleted the directory that houses this script and then had to re-run this because we were getting the dreaded "White Screen".
I looked on Google a bit and didnt find anything that answered the question why the directoy might just disappear.
Any ideas?
Thanks,
Cleako
|
|
|
|
|
Anyone have an example of using javascript to select a row in a datagrid from a different form. I want the javascript to trigger the selection that then post backs to the server to retrieve the desired result.....
Two Forms:
FormA.aspx - Contains Datagrid, with editable image button, onclick image button renders information on the same form.
FormB.aspx - users open this form from a link within FormA.aspx, once work has been completed and submit button clicked, form is closed which would then trigger the post back method of the image button row click event on FormA.aspx
Any ideas
My eyes hurt!
|
|
|
|
|
well actually you can talk to 2 different browser windows.
You could however talk betweeen frames on the same page with the javscript DOM
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hi all
I create .aspx page
It is working in local machine
but when i uplod to server it is giving this error
<configuration>
<system.web>
<customerrors mode="Off">
But i create only 1 page i.e page1.apsx
Can any one tell me what is the error
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
That's not much of an error message... Use the "Ignore HTML tags" option when you post HTML or XML.
---
b { font-weight: normal; }
|
|
|
|
|
Sorry
It is asking for
configuration
system.web
customErrors mode="Off"
system.web
configuration
But i have only 1 file i.e page1.aspx (single page)
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Do as the information page says, and you will be able to see the real error message.
---
b { font-weight: normal; }
|
|
|
|
|
this server error comes for so many reasons..check ur web.config file.may be there is something wrong in it.if it is not then let me know
|
|
|
|
|
Hi,
In my web application (framework 1.1), I have a try-catch block handling errors. When an error occurs it is logged using Logging of EL. Later I also need to navigate to a CustomErrorPage created. Here is how the web.config tag looks like.
<customerrors mode="RemoteOnly" defaultredirect="CustomErrorPage.aspx">
The catch portion looks like this:
catch(Exception ex)
{
#region Log DS Retrieval Error
LogEntry l = new LogEntry();
l.Severity = Severity.Error;
l.Category = "General";
l.Message = String.Format("Encountered error during data retrieval {0}", ex.ToString());
l.Priority = 5;
l.EventId = 13651;
l.Title = "Data Retrieval";
Logger.Write(l);
#endregion
throw ex;
}
When I use the mode as "RemoteOnly" it does not navigate to the error page nor does it give the detailed error page. It just displays error details like error is not handled. When the mode is set to "On" it navigates to the Error Page stipulated.
Any ideas/input on how to incorporate the RemoteOnly mode to display detailed error page on the Webserver and Custom Error Page for the user?
Thanks
Minu
|
|
|
|
|
Hi everyone,
I added a GridViewRow dynamically that has a textbox. I type something into textbox and do a postback, but the textbox is empty. I'm rebinding the gridview on Page_Load everytime, but I can not see where there issue lies. Can someone take a look at my code and see if they can catch it?
aspx file ..................................................
<%@ Page Language="C#" trace ="true" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %>
<title>Untitled Page
<asp:gridview id="GridView1" runat="server" allowsorting="True" autogeneratecolumns="False" datakeynames="categoryid" datasourceid="SqlDataSource1" onrowdatabound="onGVRowDataBound">
<columns>
<asp:boundfield datafield="categoryid" headertext="categoryid" insertvisible="False"
="" readonly="True" sortexpression="categoryid">
<asp:boundfield datafield="description" headertext="description" sortexpression="description">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:JimTestConnectionString %>"
="" deletecommand="DELETE FROM [Category] WHERE [categoryid] = @categoryid" insertcommand="INSERT INTO [Category] ([description]) VALUES (@description)" selectcommand="SELECT top 10 [categoryid], [description] FROM [Category]" updatecommand="UPDATE [Category] SET [description] = @description WHERE [categoryid] = @categoryid">
<deleteparameters>
<asp:parameter name="categoryid" type="Int32">
<updateparameters>
<asp:parameter name="description" type="String">
<asp:parameter name="categoryid" type="Int32">
<insertparameters>
<asp:parameter name="description" type="String">
cs file..................................
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default9 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataBind();
}
protected void onGVRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
Table objParentTable = ((Table)e.Row.Parent);
objParentTable.ID = "Table1";
GridViewRow objTableRow = new GridViewRow(-1, -1, DataControlRowType.DataRow, DataControlRowState.Normal);
objTableRow.ID = "GVRow2nd";
objParentTable.Controls.Add(objTableRow);
TableCell objTableCell = new TableCell();
objTableCell.ID = "firstCell";
//jTableRow.Cells.Add(objTableCell);
objTableRow.Controls.Add(objTableCell);
TextBox objTB = new TextBox();
PlaceHolder objPH = new PlaceHolder();
objPH.Controls.Add(objTB);
objTableCell.Controls.Add(objPH);
objTableCell.ID = "firstCell2";
objTB.ID = "firsttextbox";
objPH.ID = "firstPlaceHolder";
}
}
}
Great thing comes to those who share
|
|
|
|
|
Your code binds data to the grid on every page load. Because of this you are loading a new grid from the database. Anything typed in the grid will be lost when you call the databind() method. What you need to do is save the text entered in the grid and recreate the row. Or just bind the grid once using ifnotpostback() and then bind it again as needed.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi, Thanks for helping.
I read somewhere that we specifically needed to rebind on every page load so that the dynamically created control can repopulate its viewstate. If I don't do the rebind on page_load, the GridViewRow/Textbox will disappear upon postback.
I tried bind once and rebind after a postback but still the text box is empty.
can you elaborate on this point?
What you need to do is save the text entered in the grid and recreate the row.
Do you mean store text in hidden field or viewstate and manually repopulate the textbox when binding?
Thank You
Jim
silverfox_1188
|
|
|
|
|
One possible solution...
When your page post's back find the row
foreach (GriedViewRow row in gridview.rows)
{
//find your row via some key or id that you add to the row
Textbox txt = (TextBox) row.findcontrol("txtbox1");
viewstate["txtbox1Value"] = txt.text;
}
Now when you go bind the grid again you will have the value
TableCell objTableCell = new TableCell();
objTableCell.ID = "firstCell";
//jTableRow.Cells.Add(objTableCell);
objTableRow.Controls.Add(objTableCell);
TextBox objTB = new TextBox();
//Add the following
objTB.text = viewstate["txtbox1Value"].ToString();
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi, Thank You again.
I try your suggestion and it works great. We always do grid databind on Page_Load, then onCommand button event, we store the textbox values into the viewstate, after that the sqldatasource automatically rebinds after prerender, this time we repopulate the values from viewstate.
In your oppinon, is it worth the performance hit to create dynamic controls and having to rebind on every page_load and after prerender? We could have simply placed the 2 text boxes outside of the gridview instead of adding it to the grid dynamically. It would have been easier to code but my client insisted on having them inside. What do you recommend?
thanks again,
Jim
silverfox_1188
|
|
|
|