|
Have u gone through the link given by Apurva Kaushal?
After 30 min, the Session has expired. It works fine & Correct.
Dont confused about Client Side or Server side. If you are using 'Cookies', the Cookie will retain its session values only 30 min (Cookie is stored in Client system only). This 30 min given in 'SlidingExpiration' attribute.
Cookie is expired after 30 min., the time the last request was received.
U know web is stateless. The server understands the Request from single user (Browser) by Session ID only.After the Cookie expires, for example, if u submit the Web Page, then the server cant able to idetify you (Session ID expired).So it gives "session expired" warning. You need to login again.
Have got it !!
Regards,
Jay
|
|
|
|
|
i have a dateset with value of 0 and 1,
i want bind the dataset to gridview with checkboxfiled,
in dataset all value are strings so it give error
i use bool.Parse(bool.TrueString) comment for boolen value but it gives the error
how to bind dataset with gridview
mohamad rafi
|
|
|
|
|
If you are having problem in handling it directly then use onitemdatabound event for that purpose.
Or Here[^] you will get lots of stuff on gridview control.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi all!
How can I apply CSS to the browse button of FileUpload Control? Can I also add onmouseover and onmouseout properties to the button?
If not, is there a function or method that has the same functionality as the FileUpload? like I can just invoke it on button click? My codebehind language is VB.
Thanks alot.
|
|
|
|
|
i m creating dynamic listbox
{
ListBox lstbx = new ListBox();
protected void Button1_Click(object sender, EventArgs e)
{
adp = new SqlDataAdapter("select Source from feed group by(Source)", con);
dt = new DataTable();
adp.Fill(dt);
lstbx.ID = "lstbx";
lstbx.AutoPostBack = true;
lstbx.EnableViewState = true;
lstbx.DataTextField = "Source";
lstbx.DataValueField = "Source";
lstbx.DataSource = dt;
lstbx.DataBind();
form1.Controls.Add(lstbx);
}
its populate data in lsbox at button click
but wen i select any item in listbox ,listbox disaapear how to solve it
i want to use lisbox selectedindexchanged event for my project
give me soln as soon as possible
intresting in asp.net
|
|
|
|
|
Sounds like you are not recreating your control on the selectedIndexChanged post back event.
When you create it like this in a button click, it is not persisted in the page's control tree.
|
|
|
|
|
public partial class Default3 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
SqlDataAdapter adp;
DataTable dt;
ListBox lstbx;
ListBox lstbx1;
string temp;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["Test"] = false;
}
if ((bool)Session["Test"] == true)
{
lstSource_Created();
//lstName_Created();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
lstSource_Created();
Session["Test"] = true;
}
private void lstSource_Created()
{
adp = new SqlDataAdapter("select Source from feed group by(Source)", con);
dt = new DataTable();
adp.Fill(dt);
lstbx = new ListBox();
lstbx.ID = "lstbx";
lstbx.AutoPostBack = true;
lstbx.EnableViewState = true;
lstbx.DataTextField = "Source";
lstbx.DataValueField = "Source";
lstbx.DataSource = dt;
lstbx.DataBind();
//form1.Controls.Add(lstbx);
lstbx.SelectedIndexChanged += new EventHandler(lstbx_SelectedIndexChanged);
divTest.Controls.Add(lstbx);
}
void lstbx_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write(lstbx.SelectedItem.Text.ToString());
lstName_Created(lstbx.SelectedItem.Text.ToString());
//Session["Test"] = true;
}
private void lstName_Created(string strData)
{
adp = new SqlDataAdapter("select name from feed where source='" + strData.ToString()+"'", con);
dt = new DataTable();
adp.Fill(dt);
lstbx1 = new ListBox();
lstbx1.AutoPostBack = true;
lstbx1.DataTextField = "Name";
lstbx1.DataValueField = "Name";
lstbx1.DataSource = dt;
lstbx1.DataBind();
// form1.Controls.Add(lstbx1);
divTest.Controls.Add(lstbx1);
lstbx1.SelectedIndexChanged += new EventHandler(lstbx1_SelectedIndexChanged);
}
void lstbx1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Write("hi");
}
}
this code runs without atlas
but not in atlas
how to sove it
give me some solutions plz
thank you
intresting in asp.net
|
|
|
|
|
<%
mysql=("select MAX(cast(SUBSTRING(Appellant_Notice_Number,1,LEN(Appellant_Notice_Number)-5)as int))+1 As vals FROM RegisteredCase where Appellant_Notice_Number is not null")
set rs=con.execute(mysql)
yearvar=year(Date)
if(isNull(rs("vals"))) then
anum="1/"& yearvar
else
anum=rs.fields("vals")&"/"& yearvar
end if
%>
I get the following error in the above code. Plz help me solving this error.
(Note: Appellant_Notice_Number values are, for example 225/2005 or 1/2006 or 15/2005 etc)
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid length parameter passed to the substring function.
/adminsite/Adminpages/noticeissue.asp, line 87
adsf e ed w we we w
|
|
|
|
|
LEN(Appellant_Notice_Number)-5
My guess would be that this bit is returning a negative number...that's what usually causes that error....
Or a zero-length string perhaps?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi,
I have one problem .Is there any way to have pager style mode in datagrid
to both numeric and next and previous mode instead of using usercontrols.
thanks for help in advance.
mahesh
|
|
|
|
|
|
hi guys pls help me wit this code below:
comm.CommandText = "select BrandID, Brand, ('Logo_Pics/'+BrandLogo) as BrandLogoFile from Brand";
SqlDataReader dr = comm.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
this code is working fine which is to show the picture of the products into the datalist1.
now i am trying to make it so that when users click on the picture it would link them to another page.
does any one have any knowledge of this this pls share your ideas and views pls.
|
|
|
|
|
I dont know, what control u have used in DataList to display the Picture of the product.
You may use 'ImageButton' control for ur purpose & may use PostBackUrl property for navigating to another page on Clicking the Image.
Regards,
Jay
|
|
|
|
|
Hi,
I think you have used DataList control here, I am not familier with DataList, we actually use Data Repeater, the procedure to set the link is in data repeater:
<asp:repeater id="Repeater1" runat="server">
<itemtemplate>
" border="0" />
Sorry i want to suggest you, but i cant able to answer you correctly...............
bye
Exelio
Know is Drop, Unknown is ocean
|
|
|
|
|
Couple of ways to do this - simplest is to add an on click handler to each image in ItemDatabound....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have a problem caused by an earlier design of a program developed by an external vendor. We have an sms system that accepts request via URL parameters (Eg: http://internalserver/sms.aspx?hp=3453453+msg=testtest).
I am trying to make this a more user friendly experience and thus have came out with a webform that accepts a mobile number and the message. Whenever the user clicks on the "Send" button, I would do the followng:
1) Create the URL and initialise it accordingly. Eg: http://internalserver/sms.aspx?hp=3453453+msg=usersmessage
2) The webpage will then launch this url in a new browser window.
The problem is if a user would like to send multiple sms, a large number of new browser window will open which is not ideal. Is there a way in ASP.NET to execute a url without having to launch another browser window or redirect the current one.
Note: The earlier system cannot be changed.
|
|
|
|
|
Server.Execute(url, StringWriter);
You can than use StringWriter's ToString() method to get the generated HTML.
|
|
|
|
|
i am new to asp.net
in exception handlig can we create more than one try block
can we catch different error in one try catch blocks
plz help me
prasad.g
|
|
|
|
|
|
I need to convert the following code into .net. the existing code is in coldfusion and runs as a background process.
Can someone help me in converting this coldfusion code to .net code.
<code>
<CFPARAM NAME="ATTRIBUTES.JUSTIFY" DEFAULT="no">
<CFIF NOT ThisTag.HasEndTag>
<CFABORT SHOWERROR="You need to supply a closing <CF_FileWriteText> tag.">
</CFIF>
<CFIF ThisTag.ExecutionMode is "End">
<!--- If it has <pre> or <code> tags, just leave the whole page alone!! --->
<!--- When CF reg expressions have non-greedy searching, I'll deal with this more intelligently --->
<CFIF REFindNoCase("<pre>|<code>", ThisTag.GeneratedContent) EQ 0>
<!--- Replace whitespace between CR/LFs with a single CF/LF --->
<!--- That fixes almost all of the major whitespace --->
<CFSET ThisTag.GeneratedContent = REReplace(ThisTag.GeneratedContent, "[#Chr(13)##Chr(10)#]+[[:space:]]*[#Chr(13)##Chr(10)#]+", "#Chr(13)##Chr(10)#", "ALL")>
<!--- If JUSTIFYing, remove whitespace at beginning of each line --->
<CFSET ATTRIBUTES.JUSTIFY = ucase(ATTRIBUTES.JUSTIFY)>
<CFIF ATTRIBUTES.JUSTIFY EQ "Y" OR ATTRIBUTES.JUSTIFY EQ "YES">
<CFSET ThisTag.GeneratedContent = REReplace(ThisTag.GeneratedContent, "[#Chr(13)##Chr(10)#][[:space:]]*", "#Chr(13)##Chr(10)#", "ALL")>
</CFIF>
</CFIF>
</CFIF>
<CFSETTING ENABLECFOUTPUTONLY="NO">
</code>
Thank you in advance.
Sudip
-- modified at 3:40 Thursday 7th September, 2006
|
|
|
|
|
+ "Help" is a useless title, see Chris's golden rules[^].
+ Cannot give you a direct anwser as I have no idea about ColdFusion, sorry, but the migration site[^] may give some ideas.
|
|
|
|
|
|
|
HI Satips,
I got the Framwork . Need the documentation.
|
|
|
|
|
Do you find anything ?
AUS Enrique Ferreyra
(Pachu)
|
|
|
|