|
|
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
|
|
|
|
|
How to access the values of hidden fileds of form A in form b?
Sessions or querystrings should not be the option! I heard we can access any control of one form in another using persistpage class in 2.0 however iam using 1.1 and c# can i access these hidden fields?
Gautham
|
|
|
|
|
What's done in .NET 2.0 is that an object instance of another page can be created, and that object consumes the data in the Request.Form collection so that you can access the values using that page object.
All the data that was posted to the page is available in the Request.Form collection. You can access those values directly, there is no need to instantiate another page object to do so.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi friend
i have hash table where we store key and value. on value place i stored one more hash table so how i get that value which is store in value hash table
help me
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Hi Friend:
Here is code for getting child hashtable value.
//Make main Hash table
Hashtable mainHashTable = new Hashtable();
//Make child Hash Table
Hashtable childHashTable = new Hashtable();
//Add child hash table value
childHashTable.Add("ChildValue", "Mubashir");
//Add child hash table to main hash table
mainHashTable.Add("HashTable", childHashTable);
//Get Child Hash table value
((Hashtable)mainHashTable["HashTable"])["ChildValue"].ToString()
|
|
|
|
|
but i have many walu in child hash table like this:-
Dim ConfId As String
Dim meesage As String
Dim SinglNode As System.Xml.XmlNode = xRequests.SelectSingleNode("/cwaEvents/conference")
ConfId = SinglNode.Attributes("confId").InnerText
Dim SinglNode1 As System.Xml.XmlNode = xRequests.SelectSingleNode("/cwaEvents/conference/messageReceived/message/content")
If SinglNode1.InnerText <> "" Then
meesage = SinglNode1.InnerText
'M_MessageTextHTAble = M_MessageHTAble.Item(ConfId)
M_Messagecounter = M_Messagecounter + 1
M_MessageTextHTAble.Add(M_Messagecounter, meesage)
M_MessageHTAble.Remove(ConfId)
M_MessageHTAble.Add(ConfId, M_MessageTextHTAble)
End If
Return M_MessageHTAble
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|