|
How to end previous session???
That is what I want to know...
|
|
|
|
|
Hello,
Page_load event is firing two times, what may be the reason, what is the solution.
Thanks in advance.
Pinna
|
|
|
|
|
Page_Load runs every post back. You can try wrapping the code in a if(!IsPostBack)...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thanks for response..
i wrote the code like that only..if(!IsPostBack)...still page_load is firing two times..
i wrote the code like below..
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
If Not IsPostBack Then
lblUserDet.Text = Session("LoginName")
End If
end sub
Pinna
|
|
|
|
|
What makes you think it is firing 2 times?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I have two textboxes in my aspx form. One is having SingleMode and the other one is having Multimode.
The issue is font looks like different stlyes in Multimode text box, eventhough both the font styles set to MS SansSerif or Aerial.
Any idea how to make both look like same?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
set textbox property Font-Names="Ms SansSerif" in <asp:textbox xmlns:asp="#unknown"> in aspx page
|
|
|
|
|
Hi,
I have a gridview with a textbox template field. On two pages I need this textbox to be enabled but on a third page it must be disabled. What is the best way to do this? My gridview is a user control.
Right now I'm doing this:
<asp:templatefield headertext="Size" xmlns:asp="#unknown">
<itemtemplate>
<asp:textbox id="txtSize" runat="server" text="<%Bind("Size")%>" readonly="false" enabled="false" enableviewstate="true"></asp:textbox></itemtemplate></asp:templatefield>
If I change enabled to true then on all the pages the textbox is editable. Is there a way I can call the textbox property in the user control to enable or disable the textbox? For example (this isnt working though):
public bool EnableTextBox
{
get
{
return txtSize.Enabled;
}
set
{
txtSize.Enabled=Value;
}
}
Please help!
Thanks =)
|
|
|
|
|
The obvious way is to set your enabled property from a code behind property, and then set that in code.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
if (e.NewPageIndex == 2){ }
else{ }
GridView1.PageIndex = e.NewPageIndex;
BindData();
}
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I have a gridview that is sorted alphabetically and has a header that allows the user to sort through the items by clicking on a letter. How do I set the gridview so that on the page load, only the items that start with 'A' are shown?
Thanks!
|
|
|
|
|
Set your data source to only return items starting with A
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How do I do that?
I am using a user control so that one the first screen all of the items are available, but only those starting with the letter A are shown unless the user sorts the gridview. On all subsequent pages, however, only the selected items are shown, and all of those must appear.
|
|
|
|
|
you don't want full alphabetisation, just to show the As on the first page and on subsequent pages to show the rest ?
You're going to have to manage paging yourself, and modify the SQL to the datasource to return the page you want.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Perhaps I wasn't clear enough.
Page 1- Select from All available items, but default screen shows only items starting with letter A. The user can select or search for other items by clicking on a letter of the alphabet.
Page 2 - shows All of the selected items from page 1.
I need help with Page 1 and only showing the items that start with letter A.
|
|
|
|
|
Page 2 is obviously unrelated to the current task. Page 1, shows only items starting with A, by default. At some point, in a way you're not defining, it goes on to show all items. Right ?
Refer to my first reply. The *best* way to only show items starting with a, is not to filter them somehow in your presentation layer, it's to only request those items from your data store. So, if you only want to show A or show all, you need two different requests for data, one which returns the 'a' items and one which returns all. You'd swap between them based on whatever state change it is that causes you to want to view all. I'd have assumed you'd be paging by letter, which would mean you'd write your own paging code ( and control, I would think ) and from there request each letter as required, but this is even easier.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
How do i get rid of the "new line in constant" error in:
<a style="color:#002D65;font-family:Verdana" href='<%#"Categorie.aspx?ca=" + DataBinder.Eval(Container.DataItem,"Parinte")+ "sel=" + DataBinder.Eval(Container.DataItem,"Id")"%>'> <%#DataBinder.Eval(Container.DataItem, "Nume")%> </a>
|
|
|
|
|
Well, I would remove stuff until it works, then work backwards, this is a bit convoluted. I would replace the href stuff with a single function call that passes the data item to a method that generates the URL on the back end. This is just too messy.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
i have a windows service(VB.net running on windows 200 server accesing sqlserver2000 on another server)running in my appserver and sqlserver running in dbserver.
the service looks for feeds(.csv files with a particular name, this file arrive every 2 hrs.) in D/Feeds of appserver, if it found the file it fetch and insert the data to the database and generate a .csv file for one of our partner system and save it in D/outputs.
my issue is my service fails to generate feeds if my database server get rebooted. now i am restarting the service if i am not seeing the output file in the specified time intervell.
i think my service cannot access the database once the dbserver get rebooted.
a solution for this is greatly appreciated.
|
|
|
|
|
What does this have to do with ASP.NET ?
Does your code try to reconnect to the DB if hte connection fails ? Does it generate an error log ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
When the service fails to start it most probably leaves a message in the event log.
So check your event log.
My guess is that your service tries to start before another service which it depends on.
When you find out which service that is, you make your service dependant on it.
|
|
|
|
|
Hi, my requirements are same as of CodeProject.com. I want to create a page(aspx) for every user who register on my website. Same as CodeProject.com creates a new pages when one writes a article.
For eg. if a user register on my site and a ID assisgned to him is John9878. Then system should create John9878.aspx and John9878.aspx.cs. Can somebody help me on this problem.
|
|
|
|
|
I would say you need a subfolder ( www.mysite.com/users for example ) and use URL rewriting to redirect John9878,aspx to redirect to a standard page which takes that name as a parameter and looks it up in the database.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Amandeep Singh Bhullar wrote: Hi, my requirements are same as of CodeProject.com. I want to create a page(aspx) for every user who register on my website. Same as CodeProject.com creates a new pages when one writes a article.
I don't think it does. It just looks like it does. It is just a page backed by a database and to make nice URLs you can create an HttpModule or HttpHandler that examines the URL from the browser and translates it to an internal value that then renders the page. As far as the outside world is concerned it looks like a new page file has been created.
URLs just look like file paths because originally they were just file paths in the server. These days a URL can refer to anything. Look at ASP.NET MVC routing to see some powerful stuff done with URLs.
|
|
|
|
|
Colin Angus Mackay wrote: I don't think it does. It just looks like it does.
Check it out(Just For Example)
http://www.codeproject.com/KB/miscctrl/vbnet-multitab-browser.aspx
This URL depicts that it is a new page. Also this page is indexed in Search Engine. If it is simple URL rewriting, then how Search engine index it.
Same is the case with all articles
|
|
|
|