|
kubben wrote: That is what the placeholder control is made for
no, it's not
Use the PlaceHolder control as a container to store server controls that are dynamically added to the Web page.
only two letters away from being an asset
|
|
|
|
|
You are right. I guess I should have looked closer at the original post. Thanks for the correction.
Ben
|
|
|
|
|
Hi,
I have created my grid view using the <asp:TemplateField> for all the columns.
Now I wish to Sort the corresponding Column wise, when I click on the respective Column Header (Its LinkButton Control).
How efficiently I can able to do this? Suggest me the idea behind this.
Regards,
Jay
|
|
|
|
|
You have to give SortExpression for each template.
SortExpression="USER_MASTER.USER_LEVEL_ID desc"
And on event sorting you have to use it in sorting event
like : e.SortExpression
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
hi mayank could u give me that sorting event full code
Thanks in Advance
|
|
|
|
|
I will created dynamic check boxes in panel but it losing the checked values when i reloads
Example :
no problem with bind data but when i click submit i need to reload the binddata() definitely other wise panel doesn't show any items.
if i reload then checked values are losing when i calling the submit button.
sub binddata()
dim ds as dataset // here i will take data source from which from database.
Try
ds=obj.GetSource()
For index = 0 To ds.Tables(0).Rows.Count - 1
chklist = New CheckBox
chklist.Text = ds.Tables(0).Rows(index).Item(0).ToString
chklist.ID = ds.Tables(0).Rows(index).Item(0).ToString
chklist.EnableViewState = True
Panel1.Controls.Add(chklist)
Panel1.Controls.Add(New LiteralControl("
"))
Next
end sub
problem below when i reloads the databind(). but i need to be definitely reloads the databind other wist panel doen't show any thing
Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit.Click
While index < ds.Tables(0).Rows.Count
DisplayPanel = CType(FindControl("panel1"), Panel)
chklist1 = CType(DisplayPanel.FindControl(ds.Tables(0).Rows(index).Item(0).ToString), CheckBox)
If Not chklist1 Is Nothing Then
chklist1.Text = ds.Tables(0).Rows(index).Item(0).ToString
If chklist1.Checked = True Then //here showing that not checking even thought i will check check boxes
objWeb.Addid(drlist.SelectedItem.Value, chklist1.ID)
End If
End If
index = index + 1
End While
end sub
this is haneef
this is haneef
|
|
|
|
|
haneef1 wrote: If chklist1.Checked = True Then //here showing that not checking even thought i will check check boxes
objWeb.Addid(drlist.SelectedItem.Value, chklist1.ID)
End If
here after this code u can capture chklist1.checked value in viewstate then when ever u are calling function check whether viewstate is empty or not if empty then ok else make chenklist1.checked = true.
here probles is because you are calling your bind funtion every postback.
Thanks,
Sun Rays
|
|
|
|
|
Full message: An error has occured in the script on this page
Line: 168
Char: 3
Error: Acess refuse
Code: 0
URL: http://......
Do you want to continue running scripts on this page? Yes \ No
' Internet explorer script error is obtained when the help icon is clicked for the second time without closing the previous help message.'
-- modified at 5:49 Thursday 12th April, 2007
|
|
|
|
|
My powers are a little weak today, so I failed to mentally visualize your code. Could you just post it here?
---
single minded; short sighted; long gone;
|
|
|
|
|
Full message: An error has occured in the script on this page
Line: 168
Char: 3
Error: Acess refues
Code: 0
URL: http://......
Do you want to continue running scripts on this page? Yes \ No
' Internet explorer script error is obtained when the help icon is clicked for the second time without closing the previous help message.'
My Browser = I E 6.0 SP2
|
|
|
|
|
That's not code.
---
single minded; short sighted; long gone;
|
|
|
|
|
I had a similar experience before, what you need to do is right click the ie->view source to find out the html source code and go to line#168 to see what error it is. Normally it is not a ie error but a program error such as unthrowed exception
|
|
|
|
|
Hello
VS 2005
I have my connection string in the web.config as followings
<br />
appSettings<br />
connectionStrings<br />
add name="serviceMasterConnectionString" connectionString="Data Source=CF_DEVELOP\realitysql;Initial Catalog=ServiceMaster;User ID=;Password="<br />
connectionStrings<br />
I can read the connection string using the following. but how do i change the connection string.
imports system.web.configuration<br />
imports system.configuration<br />
Dim cnnString As String<br />
cnnString = WebConfigurationManager.ConnectionStrings("serviceMasterConnectionString").ConnectionString()<br />
cnn.ConnectionString = cnnString<br />
I tried the following and got an error message.
config.ConnectionStrings.ConnectionStrings("serviceMasterConnectionString").ConnectionString = "new connection string"<br />
config.Save()<br />
Error:
Access to the path 'C:\Inetpub\wwwroot\CodeRedIncidents\web.config' is denied.
I would like to change the connection string at run-time and save it.
Does anyone have any code examples.
Many thanks,
Steve
-- modified at 5:56 Thursday 12th April, 2007
|
|
|
|
|
I don't know wheather you can edit Web.config or not.
But I have done this thing using xml file.
I have add key connectstring in xml file. And I can chamge it runtime.
Hope you like using xml file
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
Hello,
I am sure you can modify the web.config file. After all its only xml. Moreover, how would you change the connection string if you wanted to connect to another database at run-time.
I am sure I am not to far off, any extra help would be most grateful,
Steve
|
|
|
|
|
:-Dcan any one explain me about vsdisco file
shuaib
|
|
|
|
|
VSDISCO files are DISCO files that enable dynamic discovery of Web Services. ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document
Thanks,
Sun Rays
|
|
|
|
|
Hi All,
In my new project I have to work both windows and webservices Commonly,can we include both win/web services in single solution file?
Pls tell me what is the advantage of using both in single project?
Thanks to all .
|
|
|
|
|
I`m using AJAX`s CollapsiblePanel (http://ajax.asp.net/) and I`m experiencing a quite annoing problem:
I set the property
Collapsed="True"
so the panel would be collapsed after page load. And it is. But after loading the page, I can see that the panel firstly expands, and then collapses. It looks disguisting. Do you have any idea how to repair it? (I want that panel to be collapsed at the begining, not expanded and then collapsed after 0,5sec)
|
|
|
|
|
How to change background color of a desired row?
I tried something like that:
protectedvoid Button1_Click(object sender, EventArgs e)
{
GridViewMain.Rows[1].BackColor = System.Drawing.Color.Red;
}
but it doesn`t work
Thank you very much for any help in advance
|
|
|
|
|
Here is the exact event and code
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex==1)
e.Row.BackColor = System.Drawing.Color.Red;
}
|
|
|
|
|
Did you try it?
Because I did and it did not work. I checked under debug that it gets to the vital line:
e.Row.BackColor = System.Drawing.Color.Red;
but I still can`t see any difference - all rows are white.
|
|
|
|
|
Yes i did then i write here.
Here is the exact event and code
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex==1)
e.Row.BackColor = System.Drawing.Color.Red;
}
|
|
|
|
|
hi i am makling a custom validation for my textbox
however the format i need for the validation is:
#=number
@ = alphebate
@#######@
and i am using asp.net2 with c#
any one got any ideas on how to do this as i am having thouble validating that the first index of the input is an alphebate >.<
|
|
|
|
|
Hi Friends,
I am trying to read file info using following code.
When i run it on my local machine it works 100% but when I upload it to hosting server it throws exception!! or in other words it goes to else all the time
can any one hlep me why?
string fileOpenPath =this.FileUpload1.FileName.ToString();
FileInfo fi = new FileInfo(fileOpenPath);
//Ceck if file file exists
if (fi.Exists )
{
//do some work
}
else
{
//show message
}
|
|
|
|