|
WE have an ASP.NET forum, and in fact, you're going to do this, if it can be done, through HTML anyhow. There is no support in ASP.NET for real player, but if the real player supports this, it's just a case of embedding the right HTML in your page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
So what you just said.... If it's impossible, you can't, but is it's possible, just do it
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
|
How to send the input to the crystal report form the main forms
|
|
|
|
|
Please don't cross post
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, all
In a web application, how to select a folder(but not just a file)directly in a dialog like the winform's. I use a class FolderNameEditor.FolderBrowser but it's not shown correctly. Please help me if you have some idea.
Thanks
Best regards
|
|
|
|
|
There's loads of ways! Mostly I use this[^] treeview, but I can imagine you don't want to buy such a control for just a directory tree. However, have you considered filling a dataset and display is using a grid? You can even generate a HTML table or something....
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Need help here Badly...
i created a gridview inside a gridview (this is to view the extended details of a certain person because of too many fields, i decided to do this.) which is binded to a sqldatasource. i can now get the value of the PersonID and store it to a session variable named Session("PersonID").
Now, my Problem is, how am i going to pass the Session variable to the sqlDataSource when the sqlDatasource and the Gridview is Inside a Gridview?
|
|
|
|
|
Hi friends
I have two DataTable with same structure one coming from DataBase and second I create dynamic.
Now I have 5 records in datatable1 and 5 records in DataTable2.
I want to Merge DatatAble2 into Datatable1
I am trying this.
DataTable1.Merge(DataTable1);
But after that I am getting only 5records instead of 10 records.
thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
Are the primary keys between the two DataTables the same? This ispossibly why you're only seeing 5 records still.
from MSDN[^]:
When merging a new source DataTable into the target, any source rows with a DataRowState value of Unchanged, Modified, or Deleted, is matched to target rows with the same primary key values. Source rows with a DataRowState value of Added are matched to new target rows with the same primary key values as the new source rows.<br />
|
|
|
|
|
I have a question how to abandon session when user right clicks on task bar and selects close. I know how to abandon session in the case the user presses alt+ F4.
Share ur ideas with me
Thanks in advance
surya
|
|
|
|
|
Hi surya,
I would be intrested to know how you abandon the session when the user closes the web browser. As far my knowledge goes the session will still be active till the timeout period is reached even though the the browser is closed.
Since the is no way IIS could determine if a browser is open or closed.
Thank you
Laddie
|
|
|
|
|
I am creating a golf Application to keep track of my stats and I am using a formview. Is there a better way to do this...
Private Sub GetPutts()
Dim txtPuttOne As TextBox = Me.FormView1.FindControl("txtPuttsHoleOne")
Dim intPuttOne As Integer = CInt(txtPuttOne.Text)
Dim txtPuttTwo As TextBox = Me.FormView1.FindControl("txtPuttsHoleTwo")
Dim intPutttwo As Integer = CInt(txtPuttTwo.Text)
Dim txtPuttThree As TextBox = Me.FormView1.FindControl("txtPuttsHoleThree")
Dim intPuttThree As Integer = CInt(txtPuttThree.Text)
Dim txtPuttFour As TextBox = Me.FormView1.FindControl("txtPuttsHoleFour")
Dim intPuttFour As Integer = CInt(txtPuttFour.Text)
Dim txtPuttFive As TextBox = Me.FormView1.FindControl("txtPuttsHoleFive")
***all the way to Hole 18
Try
dsPutts.InsertCommand = "INSERT INTO [dbo].[Putt_Info] "
dsPutts.InsertCommand += "([CourseId] ,[UserId],[ScoreID],[PuttsHoleOne],"
dsPutts.InsertCommand += "[PuttsHoleTwo],[PuttsHoleThree],[PuttsHoleFour],"
dsPutts.InsertCommand += "[PuttsHoleFive],[PuttsHoleSix] ,[PuttsHoleSeven],"
dsPutts.InsertCommand += "[PuttsHoleEight],[PuttsHoleNine],[PuttsHoleTen],"
dsPutts.InsertCommand += "[PuttsHoleEleven],[PuttsHoleTwelve],[PuttsHoleThirteen],"
dsPutts.InsertCommand += "[PuttsHoleFourteen],[PuttsHoleFifteen],[PuttsHoleSixteen],"
dsPutts.InsertCommand += "[PuttsHoleSeventeen] ,[PuttsHoleEighteen])"
dsPutts.InsertCommand += "VALUES('" & courseID & "', '" & Session("UserName") & "', '"
dsPutts.InsertCommand += Session("ScoreID") & "'," & intPuttOne & "," & intPutttwo & "," & intPuttThree & "," & intPuttFour & "," & intPuttFive & "," & intPuttSix & "," & intPuttSeven
dsPutts.InsertCommand += "," & intPuttEight & "," & intPuttNine & "," & intPuttTen & "," & intPuttEleven & "," & intPuttTwelve & "," & intPuttThirteen
dsPutts.InsertCommand += "," & intPuttFourteen & "," & intPuttFifteen & "," & intPuttSixteen & "," & intPuttSevenTeen & "," & intPuttEighteen & ")"
dsPutts.InsertCommandType = SqlDataSourceCommandType.Text
dsPutts.Insert()
Catch ex As Exception
Response.Write(ex)
End Try
End Sub
I basically just want to grab the text the user enters in each of the controls and then insert it into the database.
Thanks in advance
|
|
|
|
|
well, if u r using VS.NET 2005 u can do it in a very simple way by using an SqlDataSource object. You can configure the SqlDataSource object by appropriately selecting the server name, the database and the table u want to add the data. Then it automatically generates the SELECT,INSERT,UPDATE,DELETE statements or u can use ur own stored Procedures to do them.
then drag n drop a formview on to the application and set it's datasource to SqlDataSource.
e.g: FormView1.DataSource = SqlDataSource1;
FormView1.DataBind();
|
|
|
|
|
Not quite what I was looking for. I do have a datasource and what not but I am looking for a better way to grab the actualy entered data without having to declare 2 variables (Textbox and a integer) just to get the data from the formview.
|
|
|
|
|
I have a dynamic report engine which builds the report parameters from the stored procedures on SQL server. Everything works fine except the CustomValidator controls. When I add one for a Date Validation function I get the error "Condtional Compilation Turned Off". Does anyone know what this is from?
From .aspx page
<div id="EditForm" runat="server">
<asp:Table ID="parmTable" runat="server" CellPadding="3" CellSpacing="3">
</asp:Table>
</div>
From .aspx.cs file
case NMTCConstants.DATE_TEXTBOX:
// New Text Box
TextBox newDateTextBox = new TextBox();
newDateTextBox.ID = name + "_" + fieldTypeCode;
if (fieldLength != "")
newDateTextBox.MaxLength = Convert.ToInt32(fieldLength);
// New Masked Edit Extender
AjaxControlToolkit.MaskedEditExtender meeNew = new MaskedEditExtender();
meeNew.ID = name + "_MEE";
meeNew.TargetControlID = name + "_" + fieldTypeCode;
meeNew.MaskType = MaskedEditType.Date;
meeNew.Mask = "99/99/9999";
// New Image For Calendar
Image iNew = new Image();
iNew.ID = name + "_I";
iNew.ImageUrl = "~/images/Calendar_scheduleHS.png";
// New Calendar Extender
AjaxControlToolkit.CalendarExtender ceNew = new CalendarExtender();
ceNew.ID = name + "_CE";
ceNew.TargetControlID = name + "_" + fieldTypeCode;
ceNew.Format = "MM/dd/yyyy";
ceNew.PopupButtonID = name + "_I";
// New Custom Validator
CustomValidator cvNew = new CustomValidator();
cvNew.ID = name + "_CV";
cvNew.ControlToValidate = name + "_" + fieldTypeCode;
cvNew.Display = ValidatorDisplay.None;
cvNew.EnableClientScript = true;
cvNew.ErrorMessage = "Invalid Date";
cvNew.ClientValidationFunction = "validateDate";
// New Validator Callout
AjaxControlToolkit.ValidatorCalloutExtender vceNew = new ValidatorCalloutExtender();
vceNew.ID = name + "_VCE";
vceNew.TargetControlID = name + "_CV";
// Add Table Row
newTblCell = new TableCell();
newTblCell.Controls.Add(newDateTextBox);
newTblCell.Controls.Add(meeNew);
newTblCell.Controls.Add(iNew);
newTblCell.Controls.Add(ceNew);
newTblCell.Controls.Add(cvNew);
newTblCell.Controls.Add(vceNew);
newTblRow.Cells.Add(newTblCell);
parmTable.Rows.Add(newTblRow);
break;
limdv
Programmer/Analyst DVLITS
|
|
|
|
|
I'm returning data from a sql query that populates a gridview however I want to modify what's displayed in 1 of the gridview columns based on whether or not a value returned in the sql query is null.
Basically, if the value in a particular row of data is null, I want to return an imagebutton that says "Add". If the value is not null, I want to return an imagebutton that says "Edit".
For example, something like this:
if(SqlQuery.SqlRow(20).SqlColumn(4).Value = null)
{
gridView.gridRow(20).gridColumn(4).Value = "<a href='addData.aspx'><img src='images/add_button.jpg'></a>";
}
else
{
gridView.gridRow(20).gridColumn(4).Value = "<a href='editData.aspx'><img src='images/edit_button.jpg'></a>";
}
Any idea how I can do this?
Thanks.
-goalie35
|
|
|
|
|
There are many ways you can handle this, one that comes to mind is On the column where you want to add this functionality
1.- Make that column a template column, this will allow you to Add controls to the column anyway you want
2.- add an Image Button on the column
3.- On the tag look for the source property of the image button
4.- Add something like this
<br />
<asp:imageButton <br />
id=imgButton1 <br />
runat=server <br />
ImageSource="<%(Eval(Container.DataItem, 'Column'))'Add.jpg':'Edit.jpg'%>" /><br />
About the property of the image I don't recall if it is Source or Image Source but you get the Idea
Greets! Joel
|
|
|
|
|
m using default Login controls in asp.net 2.0. At first there was no problem bt nw wen m trying 2 open ASPNETDB.MDF ,m receiving error "can not open user Default database.Login failed "
regards Ahmad
Ahmad
|
|
|
|
|
go to any login view in your website click on the smart tag and administer your website .
go to security and choose select authentication type and choose from the internet.
this should do it
and if it doesn't go back to your solution and delete the database it will be created again when u create a user.
BiG RaLpH
|
|
|
|
|
Hi guys. I'm new to the MB and ASP.NET as well. I'm developing a Web portal that will drill down the customer's selection of products. The catalog is received via XML from a remote server. They would like the buttons to show up dynamically based on how many records are in the xml. I have all the code written to use XPath and find the specific contents and display the buttons, but since I don't have static buttons I am having a hard time with the click event. I've done some reading on this issue but I still don't quite grasp how to resolve it. It seems even if I set something like btnProduct1.Click += new EventHandler(btnProduct1_Click), the event never fires. After the click the page reloads and I lose the buttons. I am creating the buttons in the Page_Load but this just displays the same buttons I clicked, the event is still ignored. Is there a method I can use to click one of the buttons, and make a call to either a function or transfer to a new page? I just need to bring along the button text to the new page (I am currently loading it in Session.Contents) as those buttons will be created based on what was clicked. Sorry if this is a little long, I want to be sure it is clear what I'm trying to do. Thanks much for any feedback you can provide.
Forrest
|
|
|
|
|
In order to get your postback working, you need to build the page exactly as was before the postback. In other words, you need to generate the page exactly as it was before the button was clicked. The the event will fire...
You can use a property of the buttons (for example the Tag property) to store information about which button was clicked. Determine the button pressed like so
<br />
if (sender is Button)<br />
{<br />
try<br />
{<br />
Button btnPressed = (Button)sender;<br />
}<br />
catch<br />
{<br />
}<br />
}<br />
(place the code in the event handler of your button...
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
Hi, thanks for the event code, it was very helpful and so far things are working better!
|
|
|
|
|
Hi,
I was wondering, is there a way to fire a cross-page postback via C# code?
The problems is: I have one error page that displays an error occurred in another page. I don't want to pass the error text through a query string parameter, so I need this kind of approach. And, I cannot use Session to this.
Any hint?
Thanks in advance...
|
|
|
|
|
Can you not pass an error using a code or something.... like errorpage.aspx?e=123 and then check the number to display diffrent errors?
Why can you not use sessions?
Please vote my message! Click on one of the numbers beside ' Rate this message'.
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|