|
u can initialize the page variable on the first page Page_Load and then increment and decrement that variable depending on what u need
as for the postback thing ... i'm not sure about it
Best Regards
3ala2
|
|
|
|
|
Hi,
Thanks for your suggestion. But i have to SET the Page value in URL only, B'coz it has used for many other purposes in the aspx Page.
Now i have used LinkButton Control and set its PostBackUrl property in the Page_Load event handler.
string pageIndex= Request.QueryString["page"].ToString();<br />
LinkButtonID.PostBackUrl= "Products.aspx?&page="+pageIndex;
The thing is that, i have to check for Page.IsPostBack in the Page_Load.It works fine. Previously my problrm is that, i have set it in the Click event handler of each LinkButton.
-- modified at 0:19 Friday 6th October, 2006
Regards,
Jay
|
|
|
|
|
I have a button in one page,when i clicked on that button,a pop window will open,in that popup i have a text area,ok,cancel buttons,i want to give the input to the textarea and click ok button,the popup willclose automatically,and comes to the first page click button function
Meanwhile the firstpage server execution stops when the popup is called
How to stops the firstpage server execution and starts automatically when the popups ok button clicked
Thanks&Regards
Srilakshmi
|
|
|
|
|
Why do you want the main to stop working? What does it do when you open the pop-up window? IMO, you may simply use the showModalDialog method to pop up the window and while he's working on this pop up he cannot access the main page.
|
|
|
|
|
i am using a webservice in which a method is serach. i use this method which accept a argument of date type in dd/MM/yyyy formate. i have a textbox which accept the date from the user, when i convert textbox data into Datatime formate it converted into MM/dd/yyyy formate, but i have a requirement in dd/MM/yyyy formate of date type.
please help me, i am using c#.Net 2003
-- modified at 0:29 Friday 6th October, 2006
|
|
|
|
|
|
i have try this:
string selectedLanguage = "en-GB";
UICulture = selectedLanguage ;
Culture = selectedLanguage ;
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(selectedLanguage);
Thread.CurrentThread.CurrentUICulture = new
CultureInfo(selectedLanguage);
System.IFormatProvider format =
new System.Globalization.CultureInfo("fr-FR", true);
string stringDate = "23/03/05";
DateTime DTddMMyyyy=DateTime.Parse(stringDate,format,System.Globalization.DateTimeStyles.None);
the format of DTddMMyyyy is MM/dd/yyyy and
i want it in dd/MM/yyyy as 23/03/2006. but the result should be in
datetime data type.
if i use datetime.tostring("dd/MM/yyyy") then it returns strinng type
date. but i want the return type be datetime object not string/
i am using web service which take date in datetime format and in
"dd/MM/yyyy" format. but in .Net the date type return or change or default
format is "MM/dd/yyyy". so plz help me to find the solution. this phaze is
final phase of my project and there i change ne thing like change in
service provider then it effect my whole project so plz help me
Ashutosh Kumar
|
|
|
|
|
There are a couple of things that you might want to check when you run your code in debug mode and step through your code line by line:
+ You can check the DateTimeFormatInfo value at run time especially when the DTddMMyyyy object does not have the right format:
+ You can check the DTddMMyyyy object after the Parse method executes.
Below are two examples that give me the correct DateTime object after the Parse method runs:
string selectedLanguage = "en-GB";
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
string stringDate = "23/03/05";
DateTime DTddMMyyyy = DateTime.Parse(stringDate);
string selectedLanguage = "en-US";
CultureInfo culture = new CultureInfo(selectedLanguage, true);
culture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
Thread.CurrentThread.CurrentCulture = culture;
string stringDate = "23/03/05";
DateTime DTddMMyyyy = DateTime.Parse(stringDate);
|
|
|
|
|
dear friend,
i want to get the user's loginid in to my VB / ASP applications.
can anyone please help.
you may please throw some light on various ways of getting this info.
we are having Windows server 2003 domain and
as soon as a user logs into the domain using Windows Authentication,
i want to run a service to get his loginid & proceed with other tasks.
thanks
|
|
|
|
|
Are you asking the classic ASP? Though this is the ASP.NET room, but you can have a look at the server variable LOGON_USER ( or AUTH_USER ) from the Request object. For more information, see server variables[^]
|
|
|
|
|
Try (ASP.NET C#)
User.Identity.Name.ToString()
or
string user = HttpContext.Current.User.Identity.Name.ToString();
user = user.Substring(user.LastIndexOf("\\") + 1);
Hope this help.
|
|
|
|
|
Hi
I have a datagrid and i want when i move mouse on datagrid the color og row change or the color of font be change can i do this work? can any body help me?
|
|
|
|
|
|
|
Dear All
I have problem while reading a folder on a mapped network drive.
I have an asp.net application which resides on a web server. This application reads a folder on another machine. The folder is mapped to a network drive W: in the server machine.The code which i am using is ,
DirectoryInfo DirInfo = new DirectoryInfo(@"W:\FolderName");
DirectoryInfo[] subDirs = DirInfo.GetDirectories();
The error message i am geting is ,
Could not find a part of the path "K:\FolderName".
But if i use the path as , \\IPAdress\FolderName, the application will read the directories of the folder without any problem.Where IPAddress is the IP of the machine where the folder resides.
Please HELP!!!!!
Thanks in Advance
Difin
|
|
|
|
|
There are a couple of options that your ASP.NET application may use to read the network drive:
+ Impersonate a domain account that has the permission to the folder.
+ Stick to the UNC path instead of using the drive name.
+ Run the ASP.NET process with the power account that is able to access the network drive.
|
|
|
|
|
Hi minhpc_bk
Run the ASP.NET process with the power account that is able to access the network drive.
How can we set this...
Regards
Difin
|
|
|
|
|
Hi All,
My application developed in ASP.NET with C#.NET and Oracle as Database.....
Application is running fine at my machine... but at client PC it gives error...
It have a connection problem with oracle, I try to used 2 driver of Oracle...
1 - OraOLEDB.Oracle.1
2 - MSDAORA.1
When i used OraOLEDB.Oracle.1, it not shows the Data in Datagrid
When i used MSDAORA.1 , it gives error "Oracle error occured, but error message could not be retrived from Oracle"
I done all necessary action, like reinstall MDAC and windows update...
but no success.....
plz help
|
|
|
|
|
Plz provide me some code to send SMS from my ASP.NET webpage. Plz mention free services/ web services. ASAP
|
|
|
|
|
DGtech wrote: provide me some code
Clickety[^]
|
|
|
|
|
|
When i click a label, then current webpage will be closed, how to do it ?
Thanks.
Best regards,
Chee ken
|
|
|
|
|
Add the event to the label onclick in the code behind file :
Label1.Attributes.Add("OnClick","javascript:closeWindow();");
create a javascript function in the aspx:
<br />
<script language=javascript><br />
function closeWindow()<br />
{<br />
window.close();<br />
}<br />
</script>
Thats It .... when u will click on the label, the window will be closed.
Sushant Duggal.
|
|
|
|
|
function closewindow()
{
window.close();
}
i using this one can run already , but how to make it become a hand cursor when my mouse pointer point at the label ?
Best regards,
Chee ken
|
|
|
|
|
add style tag to label
<code>style="Cursor:hand;" </code>
I am typing cursor but codeproject is changing it to removed
Sushant Duggal.
|
|
|
|