Hi,
I need to run a javascript function when the update panel is loaded completely(I want to scroll), and not on initial page load.
Please suggest.
Thanks
Hello All!
I have MS SQL Server stored procedure that returns XML (it uses SELECT with for xml auto, elements)
I tried read it into DataTable:
DataTable retTable = new DataTable();
SqlCommand comm = new SqlCommand("exec MySP", connection);
SqlDataAdapter da = new SqlDataAdapter(comm);
connection.Open();
da.Fill(retTable);
but retTable contains 12 rows with separated full xml thar SQL Server returns.
How can I read that XML from DB into DataTable object?
Thanks!
I have a form in a Compact Framework application. When the user presses the 'X' button in the top right, the screen doesn't refresh until the users taps anywhere on the screen.
The form is being shown using this code:
using (var customerDetailsForm = ObjectFactory.Get<CustomerDetailsForm>())
{
customerDetailsForm.AssignCustomerId(customerId);
customerDetailsForm.ShowDialog();
}
I search for the function that run programm by path, and working of main programm is stopped until run second programm. Can i do that by using System.Diagnostics.Process class?
When using the browser back key on a page with radio buttons and using auto-postback, the state of the buttons (checked) stays the same while other parts of the page do not. This results in a situation where button two is checked and the cached page (because of server-side logic) displays a message that button 1 is checked.
What is the best way to handle this situation?
The following code example exhibits this behavior:
[Form:]
<asp:RadioButton ID="rb1" runat="server" AutoPostBack="true" Text="Button1" OnCheckedChanged="rb_CheckedChanged"
GroupName="rbgroup" Checked="true" />
<br />
<asp:RadioButton ID="rb2" runat="server" AutoPostBack="true" Text="Button2" OnCheckedChanged="rb_CheckedChanged"
GroupName="rbgroup" />
<br />
<hr />
<asp:Label ID="lbl1" runat="server">Button 1</asp:Label>
[Code Behind:]
protected void rb_CheckedChanged(object sender, EventArgs e)
{
if (rb1.Checked == true)
lbl1.Text = "Button 1";
else
lbl1.Text = "Button 2";
}
hi,
Yesterday i saw a site in which, site is listing the ip address and country name, saying that recently visited members (a list of ip address with country name,city name). Can i know how can i track that information any reference or any code. Thank You.
I want the control component which can provide access to all file sistem like a folder browser dialog but with supprot of which i can select many folders and file. whether there is already such a component in VS 2008 or made by third parties or should I create it myself?
What I wanted to do was create a listbox from a delimited text file.
The listbox would populate X # of rows based on the rows of the text file. And the listbox would have 3 columns, each being populated from a specific delimiter. Is this possible in C#? Any starting point would be great!
.When i choose item from "kategorije" new items loads to me in SUB_kategorije, but when i choose item from SUB_kategorije and when i click on button it shows me this error:
Object reference not set to an instance of an object.
Line 101: kom.Parameters.Add("@podkategorija", SqlDbType.Text).Value = SUB_kategorije.SelectedItem.ToString();
This is my source...
dod_pit.ascx
dod_pit.ascx.cs
CONTROLLER
public ActionResult Index()
{
GroupRepository grouprepository = new GroupRepository();
ViewData["Group"] = grouprepository.FindGroups();
return View();
}
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %
<% foreach (Group i in ViewData["Group"] as List)
{ %
" checked="checked" /
<% } %
The thing is that it is not able to find group id and displaying the following error. What is the solution?
CS1061: 'System.Text.RegularExpressions.Group' does not contain a definition
for 'int_GroupId' and no extension method 'int_GroupId' accepting a first
argument of type 'System.Text.RegularExpressions.Group' could be found
(are you missing a using directive or an assembly reference?)
I have a requirement to track what authenticated users change with regards to the data when logged in. I don't need to track what pages they look at although that could be very useful in future.
I have thought about saving the User Guid but that seems very clunky.
Are there other methods/best practises?
Hi all
I wrote a control, and use a tool to do the code analysis. There is a test that I didn't pass. Avoid excessive locals, http://msdn.microsoft.com/library/ms182263(VS.90).aspx.
In my CreateChildControls function, I built a big table with lots of field. I need to create a lot of TableRow and TableCell to construct the table. But these are not field or property of control. Thery are local variables in the function, which are created dynamically.
Should I make these TableCells and TableRows as fields of the control? Or I just keep them as the local variables in the CreateChildControl function?
Best Regards,
I know there is some syntax with ? to optionally render attribute.
But I can't find it now that I need it ...
Something like:
< input checked=<%? model.IsActivated % > ...
Thanks.
The requirement is as follows
1.) Upload the word file on website
2.) Display word file on website with the same formatting as we upload
3.) Edit and save the word file online on web
4.) Download the changed Wrod file from website (word file Format should not changed)
How to achieve this requirement.
Hy,
i went from this page on internet http://studiostyles.info/schemes that have a particular rendering technique, the list grow when the page is rendered. Is there anyone that can explain me how it is possible?
Thanks in advance.
F.
Hi,
I'm using godaddy shared hosting, with IIS7, Integrated mode, and published up a bog standard MVC2 app to dev.lazygekko.com created with Visual Web Developer 2010.
It all works, however when any of the links are clicked, they point to dev.lazygekko.com/dev/..., dev being the folder it is pointing at.
Can anyone shed some light on what I may be doing wrong?
Many thanks.
I know you can bind in the code-behind, but I don't quite understand how it works if you want to declare it within the controls tag. This is for a custom collection.
I thought it was just
Datasource="<%# MyCollection %"
Where MyCollection is an exposed property of the class in the code behind?
MyCollection{ get{ return _MyCollection;}}
Something like that. But it doesn't seem to work that way, so can I not bind this way, or am I missing something?
I need Xml that looks like this
<foo>
<bar ... />
<bar ... />
</foo>
And currently have the following class structure :
[XmlRoot("foo")]
public class Foo
{
[XmlArrayItem("bar")]
public List<Bar> myBars;
}
But this gives me Xml where bar items are wrapped inside a bars element. How should I define my custom XmlAttributes so I'd get the Xml structure I need?
I'm wondering if I'm going to store some data into the session is it going to be there while the user is authenticated (using formsauth) or might happen that the data will suddenly go null
Cache.Insert("lstDownload", GetListDownload(), null, DateTime.Now.AddDays(1), TimeSpan.Zero);
when will cache be exprired?
what will we receive when cache expired?
http://stackoverflow.com/questions
I'm using Entity Framework for creation of my Data Access Layer and I want for all of my classes to be internal.
I know it is possible to manually assign it manually in the designer for each class. But looks like it also requires to set internal modifier for each single property in every class! I have about 30+ entities and it will be a huge work to do.
Do you know any ideas how to set a 'default access' for the entire model?