|
|
Do hidden fields work when the form is configured to GET or only POST?
|
|
|
|
|
Hi All,
Im very new in this and i hope you can help me with this.
In my code i have to call this eventhandler:
private void ProgressBar1_ItemClick(object sender,
EO.Web.ProgressTaskEventArgs e)
How can i call this methode?
Thanks
|
|
|
|
|
It's a method, so call it. USe this for sender, and EventArgs.Empty for event args, if you don't have any. Of course, if the code expects values in the event args, then you're screwed.
it looks to me like this a third party control, I suspect you need to read their docs as to how to report progress. Why the hell are you using a third party control if you're 'very new at this' ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi all
I have a question about the cookies did not know where the error
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.Cookies("UserName") IsNot Nothing Then
Response.Cookies.Set(Request.Cookies("UserName"))
Else
Response.Cookies.Set(New HttpCookie("UserName", ""))
End If
Response.Cookies("UserName").Expires = Now.AddMinutes(30)
End Sub
Protected Overloads Overrides Sub OnPreRender(ByVal e As System.EventArgs)
If Response.Cookies("UserName").Value = Request.Cookies("UserName").Value Then
Response.Cookies.Remove("UserName")
End If
MyBase.OnPreRender(e)
End Sub
In another place, I set the cookies when a user's login
If Log.Statu = LoginEnum.OK Then
HttpContext.Current.Response.Cookies("UserName").Value = row("username")
HttpContext.Current.Response.Cookies("UserName").Expires = Now.AddMinutes(30)
End If
In another place again, I set the cookies when the user logout
HttpContext.Current.Response.Cookies("UserName").Expires = Now.AddMinutes(-30)
The problem is : when user login and click any link in page i find cookies have been deleted
What issue ?
|
|
|
|
|
blackeyes wrote:
Protected Overloads Overrides Sub OnPreRender(ByVal e As System.EventArgs)
If Response.Cookies("UserName").Value = Request.Cookies("UserName").Value Then
Response.Cookies.Remove("UserName")
End If
MyBase.OnPreRender(e)
End Sub
Doesnt this remove the cookie (It only leaves the cookie on the first visit because request wont have that cookie)??
Alexei Rodriguez
|
|
|
|
|
sorry
same problem
i want to ask about those
HttpContext.Current.Response.Cookies("UserName")
Is
Me.Response.Cookies("UserName")
Or not?
|
|
|
|
|
Yes, I think so, it just a different way to access it
Sometimes when you are inside a class, you need to use the httpcontext to access response, cache, sesion...
Alexei Rodriguez
|
|
|
|
|
thanks alex
i was solve my proplem
the problem is :
i write and read cookies from Response
i forget :
i must write => in Response
and read => from Request
|
|
|
|
|
Hi,
I have had this problem quite offten when I rebuild the project. The fist line of the page is getting messed up and producing a runtime error as shown below. I think somehow it is loosing the inherits state. How can I come over this problem.
Thanks.
ERROR IS "run time error: could not load the type 'rentaholidayadmin"
<br />
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="adm_add_property.aspx.vb" Inherits="rentaholiday.adm_add_property" MasterPageFile ="~/Administration/Admin/admin.Master"%><br />
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
It seems that path to the rentaholidayadmin is not correct. Please verify it.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hi All,
I am using Gridview's Edit by enabling AutoGenerateEditButton="true" .I am able to Edit,but the values n't getting Updated.I am using xsd's.Even it's n't giving exception.
Regards
Sri
modified on Monday, September 29, 2008 5:08 PM
|
|
|
|
|
No one is going to look at all that code.
Blog link to be reinstated at a later date.
|
|
|
|
|
i have loading 1005 usercontrols ,each usercontrols haves 11 controls.
When i click submit button, i get browser timeout problem, i can't able to debug also..
After clicking button, empty browser is displayed.
Thanks in Advance
Regards
Senthilkumar.T
|
|
|
|
|
attalurisubbu wrote: i have loading 1005 usercontrols
I think you need to redesign that page
|
|
|
|
|
It's always better to minimise the size page.There are standards for the page size and response time too.Please check and design accordingly.
Cheers!!
Brij
|
|
|
|
|
<httpRuntime executionTimeout="450" maxRequestLength="6000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
add the above insyte system.web of your web.config
this should help yoou
Thanks & Regards
Pete
|
|
|
|
|
Hi
I have a gridview which has an onselectedindex change event.
Is there a way to apply this to only certain columns rather than the whole row?
thanks
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
|
a column? say, first column
private void dgv_cellenter(...){
if (
DataGridView_GrandPrixPage[0,DataGridView_GrandPrixPage.CurrentRow.Index;].Value.ToString()
== "whatever");
{...code...}
else
{...code...}}
there something is trigered (your know) if you enter a particular cell in first column.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
i have this code to upload a file file is upload name is id of the field for unique but now when i go for this folder there is no file type show. i want that if i store .rar than show .rar, if user store .zip show .zip extension, if user store .png show .png how can i do this. plz some one help me? my code is given above plz check is its right or not and what made change to convert like i want. i got file extension but now i would like to know when i show this path in link button how to load client when click on this link plz some one help me in this topic. thanks in advance.
protected void btn_add_issue1_Click(object sender, EventArgs e)
{
DataTable tbl1 = dt.filltbl("select * from tbl_issue where id=-1", "new1");
DataRow row1 = tbl1.NewRow();
row1["issue_id"] = ViewState["max"].ToString(); ;
row1["prefix"] = ViewState["prefix"].ToString();
row1["Project_id"] = Convert.ToInt32(ddl_projects.SelectedValue);
row1["project_name"] = Convert.ToString(ddl_projects.SelectedItem);
row1["issue_title"] = txt_issue.Text;
row1["issue_type"] = Convert.ToString(ddl_issue.SelectedItem);
row1["issue_desc"] = FreeTextBox1.Text;
row1["status"] = "Open";
row1["svdate"] = DateTime.Now.Date.ToShortDateString();
row1["svtime"] = DateTime.Now.ToShortTimeString();
tbl1.Rows.Add(row1);
dt.update(tbl1, "select * from tbl_issue");
fillissueid();
FreeTextBox1.Text = "";
txt_issue.Text = "";
object max = dt.getmax("select max(id) from tbl_issue");
if (fu_attachment.FileName != "")
{
DataTable tblco = dt.filltbl("select * from tbl_issue where id=" + max, "maxx");
DataRow r1 = tblco.Rows[0];
string a = Convert.ToString(max);
string str = "~/Data1/";
str = Server.MapPath(str);
str = str + a ;
fu_attachment.SaveAs(str);
r1["issue_attach"] = "~/Data1/" + a ;
dt.update(tblco, "select * from tbl_issue");
}
Page.RegisterStartupScript("myrest", "<script>alert('New issue was added successfully');</script>");
Response.Redirect("default.aspx");
}
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
modified on Monday, September 29, 2008 10:50 AM
|
|
|
|
|
Hi There,
I would like to know if someone can assist me with the following:
I need to display data in a tabular format, but I would like to group the relevant data together. In the sample below I am using a asp:repeater to populate a table. The select statement in my code behind file would return data from different employees within different companies ordered by the company name. I want to group all employees from one company together and do a basic summary line before starting with the next company i.e. Number of employees found per company.
<asp:repeater id="employeeList" Runat="server">
<HeaderTemplate>
<tr>
<td width="200">
Company ID
</td>
<td width="200">
First Name
</td>
<td width="200">
Last Name
</td>
<td width="200">
Company
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor="#ccffff" style="FONT-SIZE: 12px; COLOR: red">
<td><%# DataBinder.Eval(Container.DataItem,"COID") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"FIRSTNAME") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"LASTNAME") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"COMPANY") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:repeater>
Regards,
|
|
|
|
|
Hi,
If your data is stored in XML format, you could use XSLT to achieve this. Just in case you are unaware of XSLT, XSLT is an XML based transform language which lets you sort, present, and summarize data which is stored within an XML file.
Here is a useful link for getting started: http://www.xml.com/pub/a/2000/08/holman/index.html?page=1[^]
I hope that this is of use!
Lea Hayes
|
|
|
|
|
Hi guys!
I have had to use quite a lot of AJAX for the website that I am working on, but I am often faced with synchronizing control properties between the client and server. I started thinking about ways in which I could interact with the view state, but there are complexities involved with this (i.e. encryption and compression).
I then realised, what if a second view state were to be constructed for client side use. I could create a JavaScript class which manages this view state, and a base class for all client-side controls which eases interaction with this client-side view state. I figure that the best way to serialize this information is with JSON (I use the JavaScript Prototype Framework for this). I haven't actually created this yet because there is a major problem that I wanted to address.
Somehow I need to intercept the default ASP.NET "__DoPostBack" function so that I can add some serialization functionality for my client view state class.
Any help would be greatly appreciated!
Lea Hayes
|
|
|
|
|
I've been digging around and have just discovered the Page.ClientScript.RegisterOnSubmitStatement method. This method allows client-script code to be injected into the default ASP.NET __DoPostBack method by means of an ASP.NET specific custom event theForm.onsubmit . If the custom client-script code returns false, the post back is aborted.
So, for my particular problem, I can use this functionality of ASP.NET to create a client-side equivalent of the server-side view state.
Best regards,
Lea Hayes
|
|
|
|