|
I meant to say that even if the display shows that "The page cannot be displayed" the process of synchronisation goes on perfectly on the background... The synchronisation takes place by referring to a DLL which does the process...
|
|
|
|
|
As already been suggested, such synchronization things should be done using a service or so.
For now, it looks like its response timeout issue issue only. While you debug, probably it continously slides it so you might not get it. Try to increase the response time... but thats not advisable in general. Refer the link i provided you, it would help you.
|
|
|
|
|
On googling out i came to know that in web.config file we have to add the following tag:
<system.web>
<httpRuntime executionTimeout="5"/>
I set it 5 which means 5 seconds but after 5 seconds the synchronisation process doesnt get time out which means the executiontimeout tag is not responsible for my problem...
Im confused... plz advise...
Thanx in advance..
Tash
|
|
|
|
|
hello all,
i have made a project.In one page, After page is postback, GridView "grd1" bound with some values.
After another postback,it lost its data.
I have used EnableViewState="true" in gridview control but still it doesn't work.
could u help me ?
|
|
|
|
|
Bind your gridview on every postback
|
|
|
|
|
I think if EnableViewState="true" for the Grid and Page then its not required to bind the grid in every postback.
WWW, WCF, WWF, WPF, WFC .... WTF
|
|
|
|
|
I have already done that. But still problem occurs.......
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
BindQues();
}
}
#region Methods
public void BindQues()
{
try
{
if (Session["BindData"] == null)
{
ds = new DataSet();
ds = objGet.GetData(Request["JT"].ToString());
litMsg.Text = "Online Test";
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
gvQA.Visible = true;
gvQA.DataSource = ds;
gvQA.DataBind();
Session["BindData"] = ds;
}
else
{
gvQA.Visible = false;
}
}
}
else
{
ds =(DataSet)Session["BindData"];
gvQA.Visible = true;
gvQA.DataSource = ds;
gvQA.DataBind();
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
|
|
|
|
|
1- Check that the EnableViewState property is not false for the entire page.
2- EnableViewState is not set as false in the web.config file.
3- You are not explicitly setting the gridview Datasoure as null in your postback code.
WWW, WCF, WWF, WPF, WFC .... WTF
|
|
|
|
|
I have checked all three points you have sent.But still it doesn't work
|
|
|
|
|
Can you please show us the code ?
Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
I'm sending you the code.In this, when we refresh the page, "gvQA.Rows.Count" shows 0 rows.
Here's code:
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
gvQA.DataSource = null;
gvQA.DataBind();
BindQues();
}
}
#region Methods
public void BindQues()
{
try
{
if (Session["BindData"] == null)
{
ds = new DataSet();
ds = objGet.GetData(Request["JT"].ToString());
litMsg.Text = "Online Test";
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
gvQA.Visible = true;
gvQA.DataSource = ds;
gvQA.DataBind();
Session["BindData"] = ds;
}
else
{
gvQA.Visible = false;
}
}
}
else
{
ds =(DataSet)Session["BindData"];
gvQA.Visible = true;
gvQA.DataSource = ds;
gvQA.DataBind();
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
|
|
|
|
|
Hi..
I am working on a web application and about to complete the project.
Now I am planning to execute error handling and logging errors to my sql server database.
I am using framework 3.5.
could you suggest me what could be the best approach to execute error handling.
or you can suggest me the best link available.
thanks,
By:
Hemant Thaker
|
|
|
|
|
1- Exception Handling Block
You can user the Error handling application block provided by Microsoft.
Exception Block[^]
2- ELMAH
In some of my previous projects I have used ELMAH ELMAH[^]
ELMAH is very efficient in exception handling with simple configuration.
WWW, WCF, WWF, WPF, WFC .... WTF
|
|
|
|
|
|
Dear All,
I am looking to add SplitButton Control in my webpage but I dont know what its called in ASP.Net
you can see that in following link http://dadafghanistan.gov.af/rc?sessionid=1269861720874211[^]
you just need to login which doesnt requires username and password and you can add columns to build a report, as you add a column an split button is added which you can do other action on that too.
any ideas what control is that?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi all,
I am having something like I want to access another computer through C#. After accessing this computer, I want to show some notification through notification control.
does any body know anything about it.
I need urgent help.
Thank you.
|
|
|
|
|
BK Komal wrote: I need urgent help.
Don't be rude
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
private void Descriptiontable()
{
DescriptionClass dcss = new DescriptionClass();
dcss.ProjectIDp = Convert.ToInt32(Session["ProjectId"].ToString());
DataSet ds = new DataSet();
dtDesc = dcss.DynamicDataSet().Tables[0];
dtDesc.Columns.Add("DescriptionName1");
dtDesc.Columns.Add("Date1");
dtDesc.Columns.Add("Description1");
int intID = 1;
foreach (DataRow drow in dtDesc.Rows)
{
drow["ProjectID"] = intID++;
drow["DescriptionName1"] = "qwe";
drow["Date1"] = "";
drow["Description1"] = "asdasd";
}
Session["dtDesc"] = dtDesc;
if (dtDesc.Rows.Count == 0)
{
adddescription();
}
else
{
Bindrepeater();
}
}
private void adddescription()
{
dtDesc = (DataTable)Session["dtDesc"];
DataRow descRow = dtDesc.NewRow();
descRow["DescriptionName"] = "";
descRow["Date"] ="";
descRow["Description"] = "";
dtDesc.Rows.Add(descRow);
Session["dtDesc"] = dtDesc;
Bindrepeater();
}
private void Bindrepeater()
{
if (Session["dtDesc"] == null)
{
Descriptiontable();
}
dtDesc = (DataTable)Session["dtDesc"];
DataView dv = dtDesc.DefaultView;
if (dv.Count == 0)
{
adddescription();
}
Rptdescription.DataSource = dv;
Rptdescription.DataBind();
}
adddescription();
This is how im creating dynamic textboxes in repeater...
But how do i store viewstate of those textboxs on btnclick event...
so that values of text boxs may not dissappear on post back....
|
|
|
|
|
Where you are creating dynamic textboxes in this code?
Or you defined static html inside Repeater?
|
|
|
|
|
 yes ststic html defined..
<asp:Repeater ID="Rptdescription" OnItemCommand="Rptdescription_ItemCommand" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<tr style="width:100%">
<td colspan=16>
Description Name/Type & Source <asp:TextBox CssClass="input" ID="TextName" Width="240px" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DescriptionName") %>'></asp:TextBox>
<!-- <asp:Label ID="TxtName" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "DescriptionName") %>'></asp:Label>
--></td> <td colspan=8>
<!--<asp:Label ID="TxtDate" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "Date") %>'></asp:Label>
-->Date <asp:TextBox ID="TextDate" runat="server" Text='<%# string.Format("{0:dd/MM/yyyy}",Eval("Date")) %>'></asp:TextBox>
<cc1:CalendarExtender Format="dd/MM/yyyy" ID="CalendarExtender1" runat="server" TargetControlID="TextDate" PopupButtonID="ImageButton1" >
</cc1:CalendarExtender>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/Calendar_scheduleHS.png" ValidationGroup="false" />
<br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator14" runat="server" ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d" Display="Dynamic" ControlToValidate="TextDate" ErrorMessage="Please Enter in dd/mm/yyyy format"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="width:100%">
<td colspan=20 >
<!-- <asp:Label ID="TxtDescription" Visible="false" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>'></asp:Label>
--> <asp:TextBox CssClass="input" ID="TextDescript" TextMode="MultiLine" Columns="70" Rows="5" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>'></asp:TextBox>
</td>
<td><asp:LinkButton ID="delete" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "id") %>' ValidationGroup="false" runat="server">delete</asp:LinkButton></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
|
|
|
|
|
Okay.Then before creating new row and binding it to repeater, you need to save the edited data in text boxes to some persisting object.
|
|
|
|
|
iam using asp.net with c#.and sql server
table fields are
customername nvarchar
monitors decimal
printers decimal
scanners decimal
some times customers will take only printers , so at that time the textboxes is empty so while saving and updating it is giving errors
Input string was not in a correct format
please give example which helps me.
|
|
|
|
|
Why don't you trap for that. if your table field does not allow nulls then you cant insert a null.what you can do is to trap for that and have the reserved word that you will use if the textbox is empty.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
What kind og error it is giving can you give details here..
Thanks ,
Amit Patel
|
|
|
|
|
You should set a default value of 0 (zero) for the monitors, scanners and printers fields such that when you go to pass the data to the database all of the items have a valid value (zero should be a valid count for items denoting that whilst they may have 1 scanner, they have no printers or monitors).
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|