|
Hi, how can i use the auto documentation tool from microsoft visual studio.net please??
thanks very much for any feedback.
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
What is the best practice if i want some information to be available in all the forms. Is it good to have global variables. If not then please tell me some other alternative.
Mohinder Singh
|
|
|
|
|
I think one of the best way is creating the datacontainer class and storing there by having private variables and public properties.
There are many ways to store but depends on the size,security ...........
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
can u give me the code for this.
Thanks in advance
Mohinder Singh
|
|
|
|
|
To make sessions you need to create it like this;
Session("Name") = "Adrian"
This Session is now stored with a string called "Adrian". This session can be called from any page you want within the project.
If you want to dispose the session;
Session.RemoveAll()
I hope i helped you in some ways.
Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
|
|
|
|
|
You can use sessions also
|
|
|
|
|
how to use session. can u send me the code for it.
Thanks in advance.
Mohinder Singh
|
|
|
|
|
Suppose that I want to send a private message to a person and sender name and reciever name is saved in 2 session variables like this.Session["sender"] and this.Session["Reciever"].
Now I open 2 browser and in browser one ,click on person1 "send message" bottun and go to a page to writing message body, and then in browser 2 click on person2 "send message" bottun and go to a page...!
Now I go to browser 1 and click on "Send" bottun. the value of this.Session["reciever"] is person2 but I want to send message to person 1 .
What should we do in this case ?
|
|
|
|
|
hi all,
In my page,I have to enter only year(eg 1999) in the textbox.but it should be inserted as datetime format in DB.
how to convert year to datetime format in c#.
Eg: 1999 to 1/1/1999 12:00:00 AM
Plz give ur suggestions
thanks in advance
cheers
sangeet
|
|
|
|
|
For Every year the date and time is same ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Yes..all the year with same date and time.
I got it by just adding Convert.ToDateTime(@"1/1/" + Year_Tbox.Text)
thanks for ur reply..
cheers
sangeet
|
|
|
|
|
I tried to use below code for my login page. But I am getting below 4 errors which I am unable to resolve. Can you help me please.
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
namespace WebSite2<br />
{<br />
public class Login : System.Web.UI.Page<br />
{<br />
protected System.Web.UI.WebControls.Label LabelError;<br />
protected System.Web.UI.WebControls.Button ButtonLogin;<br />
protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;<br />
protected System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;<br />
protected System.Web.UI.WebControls.Label Label1;<br />
protected System.Web.UI.WebControls.TextBox txtpassword;<br />
protected System.Web.UI.WebControls.Label Label2;<br />
protected System.Web.UI.WebControls.TextBox txtusername;<br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
}<br />
<br />
#region Web Form Designer generated code<br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{<br />
this.Buttonlogin.Click += new System.EventHandler(this.Buttonlogin_Click);<br />
this.Load += new System.EventHandler(this.Page_Load);<br />
<br />
}<br />
#endregion<br />
<br />
private void buttonlogin_Click(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
LabelError.Visible = false;<br />
string uid, pwd;<br />
uid = txtusername.Text;<br />
pwd = txtpassword.Text;<br />
string accessLevel = CheckPassword(uid, pwd);<br />
if (accessLevel != "")<br />
{<br />
Session["UID"] = uid;<br />
Session["AccessLevel"] = accessLevel;<br />
Response.Redirect("Page2.aspx");<br />
<br />
}<br />
else<br />
{<br />
LabelError.Visible = true;<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
ex.ToString();<br />
}<br />
}<br />
private string CheckPassword(string uid, string pwd)<br />
{<br />
return "1";<br />
<br />
<br />
}<br />
private void btnNewUser_Click(object sender, System.EventArgs e)<br />
{<br />
Response.Redirect("NewUser.aspx");<br />
} <br />
}<br />
}
Below are the Errors.
Error 4 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). C:\Documents and Settings\Amarnath\My Documents\Visual Studio 2005\WebSites\WebSite2\Login.aspx.cs 1 33 C:\...\WebSite2\
Error 1 'ASP.login_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website2\34e44d00\b8acac28\App_Web_imunwsug.0.cs 870
Error 2 'ASP.login_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website2\34e44d00\b8acac28\App_Web_imunwsug.0.cs 874
Error 3 'ASP.login_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website2\34e44d00\b8acac28\App_Web_imunwsug.0.cs 192
|
|
|
|
|
For Error 4
PLease check the inherite attribute in the Login.aspx page it should be
WebSite2.Login
Again for errors 1,2 & 3 not have any idea ?
Is it showing for this application only ? or getting problems for other also ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Error 1,2,3 are coming up for only this application.
|
|
|
|
|
Hi
I dont know whether this would solve your problem, change access modifier for all button click events to 'protected' (btnNewUser_Click and buttonlogin_Click).
Harini
|
|
|
|
|
I am getting Error in exporting crystal report to pdf
the error is like :
CrystalDecision.CrystalReports.Engine.ExportException...Additional information: Error in File ..*.rpt: Error detected by export dll
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Give some more information
|
|
|
|
|
Hi
This is not an error while exporting to PDF. It is your report error. It may be a formula or SQL Expression or SQL query error.
Try to preview your report in the crystal report design. Which version you are using ???
Harini
|
|
|
|
|
Thanks harini.
I found the problem. The problem was in a text field.
Actually i am using xsd in my crystal report.
In one of the field i was passing more than 4000 characters. It gave me an error when i export to pdf. in crystal report viewer its not giving any error
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
hi,
i have created a dynamic menu control for my web application.The page is not automatically resizing its length for the menus - submenu.So the submenus are not displayed completely.But if the pagecontent is large then the entire submenus displays without any problem. I have used querystring to display my pages.
Suggestions and solutions are invited.
Thanks
Jith
|
|
|
|
|
Hello
Can you please help me with the code after the user selected the date for the calender,the date will be displayed in the DateText-Box.I want the week number to be displyed automatically in the week-numberTextbox,after the user selected the date in the calender.....
Thankm you in advance
oga m
|
|
|
|
|
In the Calendar1_SelectionChanged event use the following....
System.Globalization.Calendar cal=System.Globalization.CultureInfo.InvariantCulture.Calendar;
WeekTxt.Text= (cal.GetWeekOfYear(Calendar1.SelectedDate, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday)).ToString();
Koushik
|
|
|
|
|
|
i want to add templet column dynamically to grid
only at last position i am geting check box
tmf.ItemTemplate = New Tempfield()//implements ittemplet
GridView2.Columns.Add(tmf)
GridView2.DataSource = dsJobsynReq // dataset
GridView2.DataBind()
|
|
|
|
|
I didnt understood ur problem but may be u need to use for loop.
All the Best...
|
|
|
|