|
We all know that Session State is bad, as it won't allow us to scale applications in web farms - but now with the .NET framework Microsoft tells us it is OK to use Session state again. This can be used by using cookieless.
In this dot net creates and store some unique name toeach cookie request.
Amit
|
|
|
|
|
Can i capture the text that is entered in iframe html control.If so how?
kamalnath
|
|
|
|
|
Try to get reference to the document object of the iframe, then you can access the whatever you want in the iframe.
IFRAME Element [^]
|
|
|
|
|
Is there any Word file to PDF file converter which will convert Word file to PDF without using Printer driver.
Please tell me if there is a converter which will give a component.
If we include that component in ASP project then it should give API to use in c# code.
|
|
|
|
|
|
Hi all,
I am trying to create the Dynamic Templates to the Repeater Control.
For that i have Desined the Template & Achieved the DataBinding to the controls in the Template, using seperate user Control (ascx file).
In my page, i have used a Repeater Control, for example, say 'myRepeater'. In the code behind file i have called the 'ItemTemplate' of the Repeater using the C# code,
myRepeater.ItemTemplate=Page.LoadTemplate(xyz.ascx);
Here, it works fine.
MY PROBLEM:
Suppose, If this template comtains 'n' set of values, everything is displyed in a single row, NOT 'n' rows of Item Templates.I need a seperator field between ItemRows also.
Here my User Control contains a table with all server controls.
How to achieve this?
Regards,
Jay
|
|
|
|
|
Hi there,
If you want to display n values as n rows (RepeaterItem), then the template user control should only show 1 value, and you can specify the seperator in the SeperatorTemplate of the Repeater control.
|
|
|
|
|
No, I didn't meant like to display n values as n rows.Here is my case:
My user control simply contains a TABLE with some server controls to display data.DataBinding in done, no probs in it.
In my Page, i have used this control as a ItemTemplate for my Repeater control.
myRepeater.ItemTemplate=Page.LoadTemplate("usercontrol.ascx");<br />
myRepeater.DataSource=ds.Tables[0].DefaultView;<br />
myRepeater.DataBind();
Suppose, if my Dataset 'ds' contains 4 DataRows means, Each Row Values need to be displaye in Each Row of the Item Template in Repeater control.
(ie)Each Row in ItemTemplate of Repeater control is nothingbut the UserControl.
I hope u understood my problem. Also I have gone through all the Articles you have given me previously. All are very much helpful to me. If possible, send me a article, which explains the above.
Thanks.
Regards,
Jay
|
|
|
|
|
Hi,
I have create a webcostom control for TextBox and add one property "Xyz".
[Bindable(true)]<br />
[Category("Appearance")]<br />
[DefaultValue("")]<br />
[Localizable(true)]<br />
public string Xyz<br />
{<br />
get<br />
{<br />
String s = (String)ViewState["Xyz"];<br />
return ((s == null) ? String.Empty : s);<br />
}<br />
set<br />
{<br />
ViewState["Xyz"] = value;<br />
}<br />
}<br />
and i have set the value for Xyz from client script like
<br />
function setvalue()<br />
{<br />
form1.txt.Xyz = "Some Text";<br />
}<br />
on postback i want the value which is set from clientscript
but the value is not set.
Is there another way to set the value from clientscript and get it at serverside?
|
|
|
|
|
You don't have to add one more property 'Xyz' for that. You can use Text property of the textbox.
Like on the client side you can set the value like this.
function setvalue()
{
form1.TextBox1.value = "Some Text";
}
and On the server side, you can get this value like this:
string strGetValue = this.TextBox1.Text;
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
|
|
|
|
|
Hi Amit,
thanx for reply. I know i can use the text property but for some reseason there is another property which i want to set from clientside and get it in serverside. its like i am adding custome attribute to a control and setting the values. its not related to the text but i am setting another value.
I am doing some operation in client side after that i am setting one value for xyz and accessing that value from serverside.
do you know any other way to do it?
Hemant Mane.
|
|
|
|
|
Hi Hemant,
You can use Hidden Field also to set some value on client side and can access these values on server side easily.
Since I don't know what exactly you want to do, I am unable to tell you the exact solution. The other way to proceed is you can mail me directly or can chat with me right now.
my Chat IDs are : amit_chikara2002@hotmail.com and amit_chikara2002@yahoo.com
Regards,
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
amit_chikara2002@hotmail.com
|
|
|
|
|
Hi to all,
i am new in ASP.Net + C#. A Drop down list does not maintain its view state.Enableviewstate property of this dropdown is true.Please help me.
Thanx in Advance.
sachin Jangir
|
|
|
|
|
Hi there,
How do you know it does not persist its ViewState? How do you use the dropdownlist in your web form?
|
|
|
|
|
Where have you written its code to add values to dropdownlist?
and also check the postback property of the dropdownlist.
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
I am using MSSQL as my backend for ASP.Net.I have to retrieve time from SQL to ASP.Net textbox. The datatype of the field is smalldatetime. The value stored in it is "1/1/1900 12:20:00".How to Retrieve the time "12:20:00" from the field.
Sarvan.M
|
|
|
|
|
You can format the DateTime value into a string with only the time:
timeString = daTime.ToString("HH':'mm':'ss");
---
b { font-weight: normal; }
|
|
|
|
|
DateTime dtTime=Convert.ToDateTime(dateTime);
string strTime=dtTime.ToLongTimeString();
Mahendra
|
|
|
|
|
In MSSQL use Convert function:-
convert(varchar,date,108)
Saloni
|
|
|
|
|
I am having a little trouble with FormsAuthentication. I am trying to allow everyone view my default.aspx page but all other pages you must be authenticated. Do I need to have code in my web.config file that list every page? I prefer to keep everything under the root directory. Can anyone give me a quick example?
Programming is like solving a puzzle!
|
|
|
|
|
You can use the location[^] tag in the web.config file to do the trick.
|
|
|
|
|
Use these lines to drive all the users to your default page
onto the webconfig change the autenthication mode to forms
<authentication mode="Forms">
<forms loginUrl="default.aspx" protection="All"></forms>
keep Learning...
-- modified at 18:10 Monday 11th September, 2006
|
|
|
|
|
I am developing an internet site in ASP.Net and very first page of site is
default.aspx. I am using form authentication and code is as below
<authentication mode="Forms">
<forms name="ABC" path="/" loginUrl="home/default.aspx"
protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="Scott" password="Scott" />
</credentials>
</forms>
</authentication>
As per requirement, i want to restrict users so that they can NOT directly navigate to any other page because from default page i am taking and reading user choices which will be used to generate other pages dynamically. So he has to come from default page. I don't have any sign out button in entire application because this is e-commarce site.
Now my probelm is how to expire cookie which is generated by forms authentication, when user access site from default page.
I tried number of option like
1) Expire policy on session end e.g.
Response.Cookies("Gift2IndiaAuth").Expires = DateTime.Now.AddYears(-30)
Response.Cookies("Gift2IndiaAuth").Expires = Now
FormsAuthentication.SignOut()
But no help.....Please suggest some way......
Amit
Amit
|
|
|
|
|
Probelm Resolved --by adding one more session value. This is some workaround but not the correct way...
If you know please let me know.
Cheers
|
|
|
|
|
i wanna ask about control enable me to display article this article could be
word , pdf or html file and this article must be in aportion of my page not in all the page i hope u understand my request
rasha
|
|
|
|