|
yes i have web application and i want this page opend only by one user when this user close it The user is the only one who can open at the same time
Ahmed El-Badry
|
|
|
|
|
And how do you want to determine that a user closes the page?? Other from that... use the Application[] variables...
Application["InUse"] = true;<br />
|
|
|
|
|
use applicatoin object in the way
let suppose add this statement on page load.
if (Application["PageState"] == null)
{
Application["PageState"] = "Opened";
}
else
{
Application["PageState"] = null;
}
this object is application level and is visible to all users.
|
|
|
|
|
i need this example in VB.net not C#.net
and thnx for helping
Ahmed El-Badry
|
|
|
|
|
Hi
How to display dateformat in dd/mm/yy using calendar control.By default it
showing mm/dd/yy.How can i do this.
Rahul
|
|
|
|
|
|
Thanks.
But how can i show in a calender control.When we select date from
calendar control in textbox then it will take date in format mm/dd/yy but
i want to be in dd/mm/yy format.
Rahul
|
|
|
|
|
hello rahul,
private string dateconvert(string strdate)
{
string b = strdate.Substring(0, 2); // dd
string c = strdate.Substring(3, 2); // mm
string d = strdate.Substring(6, 4); // yyyy
string ef = c.ToString() + "/" + b.ToString() + "/" + d.ToString();
return ef;
}
Merge the substrings in ur way u will get the output in ur way..
ok byee
Murali
Murali
|
|
|
|
|
Hello,
can somebory tell me how can I get the TEXT property of the HyperLink control like I can get the TEXT property of Textbox, for example: string username = TextBox1.Text;
when I'm trying to put Hyperlink1 instead of TextBox1 it gives me exception: System.NullReferenceException: Object reference not set to an instance of an object.
Thank you!
|
|
|
|
|
you can get the text of hyperlink directly like --> HyperLink1.Text
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Thanx, but I tried, it gives me an exception, is there any other way?
|
|
|
|
|
may be it is because I'm using it this way:
HyperLink usernameh=(HyperLink) DataList1.FindControl("Hyperlink1");<br />
string username = usernameh.Text;
|
|
|
|
|
i do think so coz sometime "DataList1.FindControl("Hyperlink1");" this may return null value if there is no control found. Keep a break point and check wheather your code is returning any controls or not.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
This means that your hyperlink object is not present in ASP XML page.
or you have not saved XML page yet. (You have only save code behind page).
use this control for hyperlink.
<asp:linkbutton id="LinkButton1" runat="server">LinkButton
or use
LinkButton
|
|
|
|
|
I understand now, it is because there is only one HyperLink1, but the DataList have many rows...
|
|
|
|
|
Datalist is for viewing data. For this purpose you place the hyperlink in gridview and the on RowDataBound event please write.
protected void grdMain_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
UploadInfo uploadInfo = new UploadInfo();
LinkButton dr = (LinkButton)e.Row.FindControl("LinkButton1");
}
}
|
|
|
|
|
Thank u very much, but I didn't understand, did u mean Hyperlink instead of Linkbutton?
my code used to be like this:
protected void btnApprove_Click(object sender, EventArgs e)<br />
{<br />
HyperLink usernameh=(HyperLink) DataList1.FindControl("Hyperlink1");<br />
string username = HyperLink2.Text;<br />
SqlDataSource1.UpdateCommand = "UPDATE Users SET newuser ='" + true + "' WHERE (username='"+username+"')";<br />
SqlDataSource1.Update();<br />
}
Thanks!
|
|
|
|
|
HyperLink usernameh=(HyperLink) DataList1.FindControl("Hyperlink1");
this line will not give you the reference of control.
Because there can be more rows in the list containing hyperlinks.
|
|
|
|
|
Hi,
I'm currently developing a large scale ASP .NET application, and so far I've developed it using Access, after research, I don't think Access is going to handle the amount of usage we expect it to get, therefore I'm looking to switch to SQL Server.
Is there anyway I can do this seamlessly and quickly?
Thanks,
Aaron
|
|
|
|
|
Aaron Hudson wrote: Is there anyway I can do this seamlessly and quickly?
Export Data using Access or Import using SQL Server
|
|
|
|
|
Is it as straight forward as that?
Me = dumb
|
|
|
|
|
thereis another thing u\d need to do and that is to alter the db connection from ur application. SQL Server is not accessed the same way as Access is.
but i think it shouldn't be too much of work
Rocky
u cant climb up a ladder with ur hands in ur pockets
|
|
|
|
|
Yeah I knew about the code change.
The scenario is, I don't want to spend a couple of thousand on the full SQL, so what I've heard is that you can use SQL Express (has like a 2gb size limit I think) for now, while the project is small, and then when it brings in money, upgrade to the full.
Now the issues are:
1. Does this work / Will I have any issues in changing from Express to the full version?
2. How do I convert Access to SQL Express? (if #1 is ok)
Thanks
|
|
|
|
|
offcourse it works and importing data is a very simple task i think
just make a new database in SQL Server and right click on it > All Tasks> Import data> From data providers select MS Access, then select the Access file, give user name password if necessary and carry on with the wizard... I think that should be it
Rocky
|
|
|
|
|
There used to be an SQL Server upsizing wizard that would automatically upgrade from Access to SQL Server.
You would then probably want to do some work to make the best use of SQL server but it should work fine without the extra work.
Russell
|
|
|
|