|
Hi,
You can't assign the value directly to a textbox having textmode as password. However it can be assigned like this:
TextBox1.Attributes.Add("value","kaushal");
Best Regards,
Apurva Kaushal
|
|
|
|
|
IMO, you can simply implement the change passord functionality in the same way as a normal system does, it means the user is required to supplied his old password to change his current password. However, you are still able to set the default value for the password box by adding it to the Attributes collection as the Text property does not help in this case.
txtPassword.Attributes.Add("value","password goes here" Also, you should know that this option is not secure as it exposes the password value on the web page, and you can easily reveal it by simply doing a view source.
|
|
|
|
|
I have a BL class that i use to retrieve a Dataset. I'm binding this Dataset to a GridView as a data source, I'm not displaying all the columns so i have added three columns. I have enabled sorting but everytime i click on the header i get the error 'the gridview fired event sorting which wasn't handled'. I know this is because i havent implemented sorting event handler. But as long as i remember gridview do the sorting and paging automatically. I have done this by using either SqlDatasource or ObjectDatasource and it works fine. Can some body explain me why i can't get the auto sorting functionality when i'm binding programatically
|
|
|
|
|
If you manage to bind the data source to the GridView control instead of using a datasouce control, you will need to create a handler for the Sorting event of the control.
|
|
|
|
|
Thanks for your reply.
I tried to create handler but e.SortDirection is not toggling. Can you please give a code snippet to do this. Is there any advantage in using dataSource controls for binding
|
|
|
|
|
The e.SortDirection only works properly when you use the GridView control with a DataSource control. Basically, with datasource controls like SqlDataSource, ObjectDataSource ...you can easily use the GridView control to display data with built-in features like paging, sorting without writing even a line of code in the web page. In case of not using a datasource control, you need to manage on your own the sorting direction for example persisting in the ViewState/ControlState ...
|
|
|
|
|
So its better to make use of DataSource controls working with Gridview.
On working with EmptyDataTemplate . If there is no records in the datasource or DataSource is null then Coloums headers are removed automatically . i tried to use Templatecoloums but that also wont worked.
I need to show output like this
coloum1 coloum2 coloum3 coloum4
-------------------------------
No data Found
|
|
|
|
|
Hi! All,
I have a problem when I tried to open src in IFrame by using htmlPostedFile html control.
I have web page and in page have Iframe. I browse the physical file from local or network then I want to display file into Iframe section but it didn't work and my code is following this
Me.IframeDPF.Attributes("src") = FileUpload1.PostedFile.FileName (c:\read.pdf)
the page cannot be displayed the physical file
Can somebody know the problem this
Thank you in advance
Jibcht
|
|
|
|
|
I am running into a little bit of trouble here. Basically, I launch a popup from a form
Step 1: Form ("Employee Detail", for example)
Step 2: From "Employee Detail" form, I launch a modal dialog
<br />
function ShowSelectCostCenterDialog() {<br />
var ret = false;<br />
<br />
ret = window.showModalDialog('../UserControls/SelectCostCenterFrame.aspx?MoreThanOneBU=true', window, 'dialogWidth:970px;dialogHeight:490px;resizable:yes;scroll:yes;status:no;');<br />
if(ret) {<br />
document.forms[0].submit(); Post-back did occur. Page_Load was run and I verified it with debugger.<br />
} else {<br />
}<br />
return;<br />
}
I opened debugger, Page_Load did occur and "cost center" was retrieved from Session[COST_CENTER] and during Page_Load:
txt_CostCenter.Text = cost_center; (This was indeed executed during Page_Load)
I checked and verified that, immediately before "return" in Page_Load, txt_CostCenter.Text was indeed updated. However, the "rendered" page as seen in browser didn't get updated accordingly!?
Any idea guys?
Norman Fung
|
|
|
|
|
Hi Norman,
+ Is there any chance that the textbox is overwritten somewhere else before the page is rendered?
+ IMHO, you may just simply use the returnValue to return the cost-center value instead of posting the page back to update the textbox.
|
|
|
|
|
Hi minhpc, long time no see... How'ya doing?
minhpc_bk wrote: + Is there any chance that the textbox is overwritten somewhere else before the page is rendered?
Well, I stepped through the code: from the moment txt_CostCenter was updated (as intended) to last line in Page_Load... I don't see any other event handler on the page... And don't think "txt_CostCenter" will be overwritten by anything from base page...
minhpc_bk wrote: + IMHO, you may just simply use the returnValue to return the cost-center value instead of posting the page back to update the textbox.
Just being lazy...
Norman Fung
|
|
|
|
|
Thanks Norman, it's quite long not to see you around .
norm wrote: Well, I stepped through the code: from the moment txt_CostCenter was updated (as intended) to last line in Page_Load... I don't see any other event handler on the page... And don't think "txt_CostCenter" will be overwritten by anything from base page...
Do you use any data binding expression with the TextBox? May I see your sample code? You can also try with simple code to make sure that it's working in the way you want.
|
|
|
|
|
Hi
Is there any drawbacks in using SQL server 2000 as the back end for ASP.net 2.0 application. Is there any chance for some functionalities wont work.
|
|
|
|
|
Only if your application uses those SQL features which are not supported in MS SQL 2000 (e.g. you're using Oracle PL/SQL).
Best regards,
-----------
Igor Sukhovhttp://sukhov.net
|
|
|
|
|
Hi ol..
I am having a situation to push data to connected desktop clients. the scenario is that a search criteria would come from a web browser and depending on the criteria the message has to be multicasted to connected desktop clients. The web application is partly developed in ASP.NET 2.0 but im still loking for best ways to push this data to desktop clients. I was wondering if i could use a web service approach(but again the data cannot be pushed but only requested) or sockets. wat would the firewall or IP address issues in case of Sockets??
I am looking for any help or suggestion which could guide me towards developing this kind of framework.
any related articles also plese..
|
|
|
|
|
To push data from the server side to the client side, you may consider a couple of options below:
+ Use the .Net remoting, and you may have a look at the GenuineChannels[^] that does all the hard part for you.
+ Use the SQL Notification Services.
Just some ideas.
|
|
|
|
|
Thanks a lot for that min...U seem to be solvoing a lot of problems in this forum so im sure u can help me. I was wondering if i could use sockets to push data from server to client (like a messenger or chat application). here i have 3 questions:
1) is it possible to have a chat like application from web browser to desktop apps which are spread accross internet??
2) In case of sockets, is there constant polling to keep the connection alive? this question is just to know the total data transfer which happens in the application.
3) How can we determine the details of currently connected clients??
please consider this help request..
|
|
|
|
|
From my experience with GenuineChannels, the library does all what you mentioned in your 3 questions. Actually, GeuineChannels uses the socket internally and there are lots of interesting things in there which saved me much of my effort instead of doing socket programming on my own. You can also take a look at one of the socket libraries posted here which might give you a couple of ideas on how to do this:
http://www.codeproject.com/cs/internet/AsyncSocketServerandClien.asp[^]
|
|
|
|
|
Thanks again min..I have gone thru both the links. Genuinechannels is great but i don think i can use it for a university project and moreover it is a purchase product. So should i go ahead with reading for socket programming??
I am thinking of having a listener(server) component with every desktop client. Any request from web browser which needs to be passed to these desktop clients can fetch the listner(server) details from the application cache (list of active listeners). Is this approach feasible??
|
|
|
|
|
mastjabs wrote: i don think i can use it for a university project and moreover it is a purchase product. So should i go ahead with reading for socket programming??
Ah you are doing a university project, but I'm not sure if it's possible that you can use an evaluation version of the library in the project. But if you take this project for learning, my humble adivice is to dig into socket programming at low level or a high level technology such as .Net Remoting, and you can learn lots of cool things.
mastjabs wrote: I am thinking of having a listener(server) component with every desktop client. Any request from web browser which needs to be passed to these desktop clients can fetch the listner(server) details from the application cache (list of active listeners). Is this approach feasible??
Well, IMO the system might be working in the manner that the request is sent from web browser to the server which in turn is responsible for routing the request to the list of active listeners.
Also, this is the forum for the ASP.NET, so I don't think it will help you much in the field. In this case, you might want to visit the C# or VB.NET forums to look for better help whener you hit the wall .
|
|
|
|
|
Hello,
I am hosting my website with LunarPages who dont allow remote connection of SQL server. But I have developed my websites using local instance of SQL Express and kept mdf files in APP_DATA folder. So, I wanted a tool which can synchronize my local sql express mdf file with remote sql server. As SQL manager type software could do this things but they need to connect my remote sql server which is not allowed. I wanted to make a software by myself who can read a local .mdf file and generate SQL script (i.e. CREATE TABLE, INSERT INTO ) etc and communicate with an ASP.NET page and ASP.NET page will synchronize the SQL server database by executing the SQL query (CREATE TABLE....). Now Can you tell me which software or library can help me to generate sql create table / insert statements from local MDF file and at how can I read the SQL server database and get SQL statement again to build an mdf database in my local pc. In that way I can develop ASP.NET web application in my local pc with local mdf file with peace of mind. And at the same time if i can convert my remot sql server database to mdf file that will be a nie back up system for me.
Thanks
EMRAN
|
|
|
|
|
Hi
I am dynamically populating a TreeView using the method:
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
}
but the problem is: e.Node.Parent is *ALWAYS* null even if I click on leaf and non root nodes! any idea why?? The ValuePath string is correct and the Depth property is also always correct but Parent will always be NULL! this has me totally stumped.
any ideas? I wasted like 2-3 hrs debugging other code for this but then finally found this to be the case and am using the ValuePath to determine the root node now
(please reply here, do not send me an email thanks)
|
|
|
|
|
If you populate the nodes from client without posting the web page back to the server, then the e.Node.Parent is null as the e.Node simply represents the current node to be processed and it is not in the TreeView's nodes collection at the server side. If you want it to be not null, you can set the SelectAction property to SelectExpand . Another option is to keep the SelectAction with the Expand value, you can simply create an empty OnTreeNodeExpanded event handler.
|
|
|
|
|
Hi i a have managed to dynamically create and fill several checkboxlists on an asp.net page but now when i try and access whether or not they have been check i cannot manage to find any of the dynamically created controls on the page. i used the idea behind this tutorial here
http://www.codeproject.com/useritems/DynamicServerControls.asp[^]
so im just wonderin if anyone has any ideas why i cant access the new controls on the page i have tried each of these ways to access them, thanks in advance,
Tim
private void createFile_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
int trackControlID = 0;
if (PHOptions.FindControl("checkBoxList"+(trackControlID).ToString()) == null )
{
Label1.Text = "FOUND 1";
}
if (PHOptions.FindControl("checkBoxList"+(trackControlID)) != null )
{
Label2.Text = "FOUND 2";
}
//*** declare somecontrol point to found control
System.Web.UI.Control c = FindControl("checkBoxList"+trackControlID.ToString());
//*** change control to be DropDownList
CheckBoxList cbl = c as CheckBoxList;
if (cbl!= null)
{
Label3.Text = "FOUND 3";
}
string boxName = "checkBoxList" + (trackControlID+1).ToString();
CheckBoxList tb = PHOptions.FindControl(boxName) as CheckBoxList;
if(tb != null)
{
Label3.Text = "FOUND 4";
}
int i = 0;
}
|
|
|
|
|
Dear All,
Recently i noticed a problem .Simply the problem is i two text boxes for regno and Name and a button to save . I wrote code for saving data in button Click event. That works fine. Once i saved a data and then refresh the page the data is again saving. that means when refreshing the page button click event also executing. This creats many problem in our project. so many double entries occured. How can avoid it.?
(one solution is check same data is present in the database before inserting. But this is not practicably apply for my cases)
Please help me..........
Urgent
(if u didn't understand our problem please contact me meetbinu2003@gmail.com)
|
|
|
|