Jump to content
Xtreme .Net Talk

Jitesh

Avatar/Signature
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Jitesh

  1. Hi Mike, If it's just for displaying purpose I would rather prefer using a text file. Provide a interface to the user to write the text, save it in the a text file, read it using filestream from .aspx page and display. HTH.
  2. You can write the javascript code to get the page submitted back to the server and there you can do the further processing. Something like- document.FormName.submit(); Please check for the correct syntax. HTH.
  3. Hi, That's strange behaviour. However I can think of the followings- 1. Ensure that the value of the text box in not being set programatically in codebehind or in html code. 2. You can always clear the value of the text box programatically. 3. Try deleting and adding the textbox again on your page. HTH. Jitesh
  4. Hello, User the javascript Confirm() messagebox. You should be able to capture the YES/NO and decide accrodingly. Some sampel from web - <SCRIPT language="JavaScript"> <!-- function go_there() { var where_to= confirm("Do you really want to go to this page??"); if (where_to== true) { window.location="http://yourplace.com/yourpage.htm"; } else { window.location="http://www.barbie.com"; } } //--> </SCRIPT> HTH.
  5. Change the Form method to 'POST' and retrieve using Request.Form("ParameterName"). HTH
  6. You just need to change the form method to 'GET' and the values would be appended to the URL. But be careful as there is limitation on the length of the data can posted using GET method. Then you can use Request.QueryString("ParameterName') to retrieve the value. HTH.
  7. Hi, Use SortExpression property of BoundColumns. HTH
  8. bri189a, no confusion now, Buddy :)
  9. Hi bri189a, >>I'm thinking what Jitesh is getting to is... I am not clear what you want to say. I post the link just to give an overall idea as to what all it takes to interact with DB. And I believe that gives enough hint for any developer who is ready to *learn* and put some *effort* into programming. HTH
  10. http://www.codeproject.com/aspnet/myaspnetguestbook.asp It should get you started. HTH
  11. Hi, What is the question ? Please be specific. I think one has to guess, what exactly is problem even after reading your post. :) Anyone disagree ? HTH
  12. Hi, A function is declared virtual when you need override them later. HTH
  13. Hi, Do you find it so difficult ? I bet, it's not. If you wish to spend some money go to http://www.asp.net and search in the control gallery, you will get some custome control there. If you wish to devlop you own, just search google for 'random serial number algorithm' etc and you will get few links. In case you couldn't find let me know i will search my DB of links :confused: and would send you.
  14. Calvin, Instead of thinking about removing the "," from the begining of the string you should find out the reason as to why it is there. The obvious reason could be that the first value of item.Cells(0).Text in blank. Now, you may would like to check item.Cells(0).Text value before it is stored in the array. Something like : For.... if item.Cells(0).Text <> "" then UniqueIDList(i) = item.Cells(0).Text end if Next But then you should also investigate that why is it blank. I would again suggest you go through some good book. And through tutorial and try looking at the problem logically. HTH
  15. Jitesh

    Interfaces?

    Hi, One quick thought about usage of interface in C# is - Multiple Inheritence. There are many more. HTH
  16. Hi, A possible scenario for online registration could be to design your application to acccept the registration number from the user and then application sends the same to a specified url. The script at the url would validate the registration number against the stored list (a database on webserver) and would return the response to the appliation. am i talking sense ? or are you asking how to generate set of registration numbers. HTH
  17. Hi, You can't just write dv.RowFilter = sID It should be like: 'Now fileter the record in DataView and bind it to DataGrid dv.RowFilter = "YourIDField Not In (" & sID & ")" You can have any delimiter as long as they don't mess up with your data item. HTH
  18. Hi, 'Declare an Array to hold IDs dim UniqueIDList() as string For i = 0 To DataGrid1.Items.Count - 1 item = DataGrid1.Items(i) cb = CType(item.FindControl("cb"), CheckBox) If cb.Checked = True And cb.Enabled = False Then 'You need to resize the array here ReDim Preserve UniqueIDList(i) 'Store the value of IDs to array 'Considering the Cells(0) has the IDs UniqueIDList(i) = item.Cells(0).Text End If Next Notice , the Redim statement above. I would strongly suggest you to go through some tutorial on Array usage in VB.NET. HTH
  19. **I get an error on sID= UniqueIDList.Join(",") My mistake. Try this: sID= String.Join(",",UniqueIDList) For more see this, http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=169&lngWId=10 HTH
  20. Hi, ** The identifier will be the checkbox(checked & disable) Nope, by identifier i mean the column which identifies your record uniquely in your database. You need a correponding value inorder to identify which rows to be excluded. I would suggest you to include the one more field (may be PK of the table) in your select statement. Then you can have a invisible column in datagrid to store your unique record identifier. Now, 'Declare an Array to hold IDs dim UniqueIDList() as string For i = 0 To DataGrid1.Items.Count - 1 item = DataGrid1.Items(i) cb = CType(item.FindControl("cb"), CheckBox) If cb.Checked = True And cb.Enabled = False Then 'Store the value of IDs to array 'Considering the Cells(0) has the IDs 'UniqueIDList(0) = item.Cells(0).Text End If Next Then, Join the array and make a comma seperated string of IDs. 'Dim sID as string 'sID= UniqueIDList.Join(",") Now, as you have the ID list, use it in DataView.filter. Please check the syntax of the above code and modify, if needed. I need to switch too often in between VB.NET and C# for my work. So, most of the time i end up mixing the syntaxes of both:) HTH
  21. Calvin, You may store the data source in session object to make it available between posts to the server - Function BindTable() ---------- ---------- Session("Source") = dt End Function Private Sub btnHide_Click(.....) ---------- ---------- 'Get the indentifier of the records you want to exclude If cb.Checked = True And cb.Enabled = False Then 'Get the values from the Grid and store in a variable End If 'Considering you have populate a variable - NameList ' which contains the comma seperated names to be excluded ' Retrieve the data source from session state. Dim dt As DataTable = CType(Session("Source"), DataTable) ' Create a DataView from the DataTable. Dim dv As DataView = New DataView(dt) 'Now fileter the record in DataView and bind it to DataGrid dv.RowFilter = "Name Not In '" & NameList & "%'" DataGrid1.DataSource = dv DataGrid1.DataBind() End Sub Do write to me for if any more clarification needed. HTH
  22. Hi Cavin, You can use the DataView as datasource for your DataGrid. You can always set the filter on DataView to remove the rows. HTH
  23. Hi, I also think on the same line. I never came across the limitation of dropdown list box. ASP.NET maintains state for each control on the page for which viewstate is set to TRUE. And for maintaing the viewstate the controls data is transferred from the webserver to client browser and vice versa. So with the increase in amount of data transfer, the performance decreases. HTH
  24. Hi, Simply remove the rows from the datasource and bind it to datagrid on post back. HTH
  25. Hi, You can use the ItemDataBound event of DataGrid to access cells width property before it is rendered. private void DataGrid1OnItemBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { e.Item.Cells[0].Width = 200; } } HTH
×
×
  • Create New...